dealpos 26.41.56 → 26.42.1

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 (175) hide show
  1. package/browser/{chunk-NIEJUTEO.js → chunk-27XATA5P.js} +1 -1
  2. package/browser/{chunk-AWENDKAA.js → chunk-2CBOQPZU.js} +1 -1
  3. package/browser/chunk-2NSKXQE5.js +2 -0
  4. package/browser/{chunk-D4BEJ6ZS.js → chunk-2RMPKC5T.js} +1 -1
  5. package/browser/chunk-2WNVA75D.js +1 -0
  6. package/browser/{chunk-TM5ZKKQ7.js → chunk-2XNXLMU4.js} +1 -1
  7. package/browser/{chunk-OKQUTA7Q.js → chunk-2ZESPSVJ.js} +2 -2
  8. package/browser/{chunk-TTRF5UU5.js → chunk-2ZSQMNJZ.js} +1 -1
  9. package/browser/{chunk-3JYVH5UF.js → chunk-32Y7ORRS.js} +1 -1
  10. package/browser/{chunk-RDR5QRH2.js → chunk-36NISD63.js} +1 -1
  11. package/browser/{chunk-R3LVKGET.js → chunk-36XFFZ3Q.js} +9 -9
  12. package/browser/{chunk-LXLIHRSS.js → chunk-3AH7R62G.js} +1 -1
  13. package/browser/chunk-3MYO4VLS.js +1 -0
  14. package/browser/{chunk-BBFGGC2A.js → chunk-3N5G6LCG.js} +1 -1
  15. package/browser/{chunk-I64NISZR.js → chunk-3UMRYO24.js} +1 -1
  16. package/browser/{chunk-BOUAAC7W.js → chunk-45DPM4ZS.js} +2 -2
  17. package/browser/{chunk-MSWXD5AK.js → chunk-4EKQLFNQ.js} +1 -1
  18. package/browser/chunk-4GQFWEBK.js +4 -0
  19. package/browser/{chunk-YASD3VTU.js → chunk-4J6MO575.js} +1 -1
  20. package/browser/{chunk-V2KFOI5O.js → chunk-4KLYODZA.js} +1 -1
  21. package/browser/{chunk-WITSWWDT.js → chunk-4L5Y2T4Z.js} +1 -1
  22. package/browser/{chunk-5WGVHMJO.js → chunk-5BG2L65M.js} +1 -1
  23. package/browser/{chunk-W5OI7ST2.js → chunk-5IOACAJQ.js} +1 -1
  24. package/browser/{chunk-YBESMONY.js → chunk-5NC22PJL.js} +1 -1
  25. package/browser/{chunk-ZMT7ROCE.js → chunk-677VCCVW.js} +1 -1
  26. package/browser/{chunk-5XSCMT3F.js → chunk-6HBJVSOJ.js} +1 -1
  27. package/browser/{chunk-5IH2IOBL.js → chunk-6RDXN62T.js} +1 -1
  28. package/browser/{chunk-OLK4BSJ7.js → chunk-6VRZZV47.js} +1 -1
  29. package/browser/{chunk-FASCCLKK.js → chunk-6XTELEWZ.js} +4 -4
  30. package/browser/{chunk-Z5HEZN3T.js → chunk-74765SFE.js} +1 -1
  31. package/browser/chunk-7GT43KJO.js +1 -0
  32. package/browser/{chunk-73JTRBSA.js → chunk-7PECO6WW.js} +1 -1
  33. package/browser/{chunk-LF74V53B.js → chunk-A5J5RYNH.js} +1 -1
  34. package/browser/{chunk-2BXHTKJH.js → chunk-AG7JTVHL.js} +1 -1
  35. package/browser/{chunk-BL75KLUK.js → chunk-AKROW25E.js} +1 -1
  36. package/browser/{chunk-QMEJN4V4.js → chunk-AOAKEJPH.js} +1 -1
  37. package/browser/{chunk-XPXJI7SJ.js → chunk-ARMPI3L7.js} +1 -1
  38. package/browser/{chunk-VSL2SDLK.js → chunk-ASQCVY7G.js} +1 -1
  39. package/browser/{chunk-JXIB53G4.js → chunk-AXCIF56W.js} +1 -1
  40. package/browser/{chunk-UR5AAM2B.js → chunk-AYNC2FWP.js} +1 -1
  41. package/browser/{chunk-X2N4EVCT.js → chunk-B57ROSBA.js} +1 -1
  42. package/browser/{chunk-NK7E7UJL.js → chunk-B5JQXQGK.js} +1 -1
  43. package/browser/{chunk-CLKRFLKL.js → chunk-BGHE2IE4.js} +1 -1
  44. package/browser/{chunk-D7TIRKQD.js → chunk-BLIZUAEE.js} +1 -1
  45. package/browser/{chunk-Z44ILGWR.js → chunk-BQ4CG3SJ.js} +1 -1
  46. package/browser/{chunk-LIHDRST2.js → chunk-BUEH3WJ3.js} +1 -1
  47. package/browser/{chunk-CKMZBOZL.js → chunk-BV4DUDYR.js} +1 -1
  48. package/browser/{chunk-HVE4FT5Q.js → chunk-BZADAYS6.js} +1 -1
  49. package/browser/{chunk-AZZZOSB5.js → chunk-CINZRC2S.js} +2 -2
  50. package/browser/{chunk-WMAFTR3U.js → chunk-CO34WECE.js} +1 -1
  51. package/browser/{chunk-PYKNLJIG.js → chunk-CR3IHNSI.js} +1 -1
  52. package/browser/{chunk-TRJZVPIS.js → chunk-CW234Q5Q.js} +1 -1
  53. package/browser/{chunk-QGL3ZQVB.js → chunk-D77CHGHN.js} +1 -1
  54. package/browser/{chunk-THV2MITZ.js → chunk-DBTNZ6JX.js} +1 -1
  55. package/browser/{chunk-ONQO2I6F.js → chunk-DOXLKNTP.js} +1 -1
  56. package/browser/{chunk-S7D4YVIZ.js → chunk-DYZO54HJ.js} +1 -1
  57. package/browser/{chunk-YT3FH5LZ.js → chunk-E2U4OBDT.js} +1 -1
  58. package/browser/{chunk-KQCS7D3I.js → chunk-E3ALFOHT.js} +1 -1
  59. package/browser/{chunk-7EZWRZF2.js → chunk-E7YS6X3Z.js} +1 -1
  60. package/browser/{chunk-PGV7CR57.js → chunk-EPH6FRN4.js} +1 -1
  61. package/browser/{chunk-I4OBGKU4.js → chunk-ESANJXEW.js} +1 -1
  62. package/browser/{chunk-P42BZLB7.js → chunk-EVJ6N7WX.js} +1 -1
  63. package/browser/{chunk-BSIV5P2J.js → chunk-EYQM5SAY.js} +1 -1
  64. package/browser/{chunk-MNSF6RR2.js → chunk-F4O7IADR.js} +1 -1
  65. package/browser/{chunk-MHS3XFLI.js → chunk-FA4JWTZB.js} +1 -1
  66. package/browser/{chunk-OZY277ZB.js → chunk-FCP7EJWO.js} +1 -1
  67. package/browser/{chunk-R5D3HG62.js → chunk-FJPPCB36.js} +2 -2
  68. package/browser/{chunk-U47ASQEC.js → chunk-FWNZEA4I.js} +1 -1
  69. package/browser/{chunk-AVVWNWQB.js → chunk-GGFMSSL6.js} +1 -1
  70. package/browser/{chunk-BMTAQ2OG.js → chunk-GIOB6QB3.js} +1 -1
  71. package/browser/{chunk-7XB6RA7V.js → chunk-GTPQMYK7.js} +1 -1
  72. package/browser/chunk-H62QPUZY.js +1 -0
  73. package/browser/{chunk-IV6JWQIC.js → chunk-HGNOI4UM.js} +1 -1
  74. package/browser/{chunk-7KTSOXKS.js → chunk-HIYNUZHR.js} +1 -1
  75. package/browser/{chunk-UGVVNBJB.js → chunk-HS4TLV2N.js} +1 -1
  76. package/browser/{chunk-O5JJMFFW.js → chunk-HVJDX7RX.js} +1 -1
  77. package/browser/{chunk-VSNEONQ7.js → chunk-IJ6QXJCX.js} +1 -1
  78. package/browser/{chunk-DMUZD6TB.js → chunk-IQTHIE5A.js} +1 -1
  79. package/browser/{chunk-CCYEPMDV.js → chunk-J2MMJCNK.js} +1 -1
  80. package/browser/{chunk-EKWBRXL5.js → chunk-JCKWFE46.js} +1 -1
  81. package/browser/chunk-K3OTPPHZ.js +124 -0
  82. package/browser/{chunk-B7OF6JMI.js → chunk-K64DYJLK.js} +1 -1
  83. package/browser/{chunk-S5BNZ74P.js → chunk-KYGLZJ57.js} +1 -1
  84. package/browser/{chunk-PY53Y4U2.js → chunk-L3CKBCQ5.js} +1 -1
  85. package/browser/{chunk-EMHLHCRC.js → chunk-L7BMH47U.js} +1 -1
  86. package/browser/{chunk-GLIID4DH.js → chunk-LEJCU3RY.js} +1 -1
  87. package/browser/{chunk-PFATDD4P.js → chunk-LSIUNHWW.js} +1 -1
  88. package/browser/{chunk-TP6N6AI7.js → chunk-M3M65GA5.js} +1 -1
  89. package/browser/{chunk-JYFQIEYE.js → chunk-MANZ7SYI.js} +1 -1
  90. package/browser/chunk-MMZKQJAR.js +1 -0
  91. package/browser/{chunk-QUEKIX5A.js → chunk-MRP4IOQG.js} +1 -1
  92. package/browser/{chunk-OKWYG2K5.js → chunk-MX7VUDYY.js} +1 -1
  93. package/browser/chunk-NMETNBTX.js +1 -0
  94. package/browser/{chunk-3X237JOI.js → chunk-NSLTXA32.js} +1 -1
  95. package/browser/{chunk-AUUEG4PA.js → chunk-O277EMKS.js} +1 -1
  96. package/browser/{chunk-FY3BKKSK.js → chunk-O3MWCLFO.js} +1 -1
  97. package/browser/{chunk-WDCT3UMO.js → chunk-OHP327YI.js} +1 -1
  98. package/browser/{chunk-GZI4RO2N.js → chunk-OREPA2WQ.js} +1 -1
  99. package/browser/{chunk-DUHLKFG4.js → chunk-OSU4XZHJ.js} +1 -1
  100. package/browser/{chunk-5U6KKKXF.js → chunk-OTNEWNB2.js} +1 -1
  101. package/browser/{chunk-DO65ADJU.js → chunk-P4UIXRMI.js} +1 -1
  102. package/browser/{chunk-46RN2EXE.js → chunk-PCY2P4WS.js} +2 -2
  103. package/browser/chunk-PEV7XBCO.js +11 -0
  104. package/browser/{chunk-IDADE5OT.js → chunk-PI27JOMS.js} +1 -1
  105. package/browser/{chunk-MFXSSIWX.js → chunk-PLSY3XSA.js} +1 -1
  106. package/browser/{chunk-EARST2OD.js → chunk-PPFWYHJJ.js} +1 -1
  107. package/browser/{chunk-K7Y7UCBZ.js → chunk-PRGYRLZL.js} +2 -2
  108. package/browser/{chunk-A6SE3QXT.js → chunk-PWCQETNY.js} +1 -1
  109. package/browser/{chunk-N4XHJ2BK.js → chunk-PZ2JMGGL.js} +1 -1
  110. package/browser/{chunk-ER2NCDJO.js → chunk-PZ6YMDQT.js} +1 -1
  111. package/browser/{chunk-IIHJIJVU.js → chunk-Q33R5JQJ.js} +1 -1
  112. package/browser/{chunk-UFA7KPAL.js → chunk-QBLLN2GM.js} +1 -1
  113. package/browser/chunk-QFSQULYO.js +1 -0
  114. package/browser/{chunk-LC3RRJUZ.js → chunk-QSR7CVZI.js} +1 -1
  115. package/browser/{chunk-AIQCVDBX.js → chunk-QVW5LP5U.js} +1 -1
  116. package/browser/{chunk-UNQQDJKB.js → chunk-RNCH3B4Q.js} +1 -1
  117. package/browser/{chunk-SBDHBCD4.js → chunk-RWOSYWIC.js} +1 -1
  118. package/browser/{chunk-UXYIWKID.js → chunk-S4XZXHQX.js} +1 -1
  119. package/browser/chunk-SE37IZHT.js +1 -0
  120. package/browser/{chunk-LV37BAFJ.js → chunk-SEMBFYJA.js} +1 -1
  121. package/browser/{chunk-X6RJ6QF7.js → chunk-TDPH652R.js} +1 -1
  122. package/browser/{chunk-ZCEDZS5C.js → chunk-TEANPU6D.js} +1 -1
  123. package/browser/chunk-TM47Q2HK.js +1 -0
  124. package/browser/{chunk-NFZJU6QU.js → chunk-TT4O4XGJ.js} +1 -1
  125. package/browser/{chunk-QND4M3CU.js → chunk-TYY3TDD4.js} +1 -1
  126. package/browser/{chunk-F5KCNF2G.js → chunk-U36PIISH.js} +1 -1
  127. package/browser/{chunk-2UZOSMPU.js → chunk-UDOGXGAL.js} +1 -1
  128. package/browser/{chunk-K7V7ZXUO.js → chunk-UTKMVBXY.js} +1 -1
  129. package/browser/{chunk-R7LJKE6Y.js → chunk-UXH4WG6N.js} +1 -1
  130. package/browser/{chunk-T5V53JV4.js → chunk-V2IL3SX3.js} +1 -1
  131. package/browser/{chunk-FRWRRL3X.js → chunk-V2TODOQI.js} +1 -1
  132. package/browser/{chunk-HCRUUUGX.js → chunk-VGWZ47Q5.js} +1 -1
  133. package/browser/{chunk-6IT2AIQO.js → chunk-VLYLELQB.js} +1 -1
  134. package/browser/{chunk-64B7RMYS.js → chunk-VVYKMLA5.js} +1 -1
  135. package/browser/{chunk-LAR7UELS.js → chunk-W4NKWSKY.js} +1 -1
  136. package/browser/{chunk-7BX77VAJ.js → chunk-WADUPHVT.js} +1 -1
  137. package/browser/{chunk-GWO2ESFY.js → chunk-WGN5SZBR.js} +1 -1
  138. package/browser/{chunk-7FDOD3T4.js → chunk-WTNZETZD.js} +1 -1
  139. package/browser/{chunk-NLBZS5N6.js → chunk-X66RQDMR.js} +1 -1
  140. package/browser/{chunk-TZ6AXFOH.js → chunk-XIWUOFTG.js} +1 -1
  141. package/browser/chunk-XQMDAPMJ.js +1 -0
  142. package/browser/{chunk-AELFCPAZ.js → chunk-XW53A7IE.js} +1 -1
  143. package/browser/{chunk-X3EZKNFB.js → chunk-XWDURTRU.js} +1 -1
  144. package/browser/{chunk-XSYDKAYT.js → chunk-YOTVKXTZ.js} +2 -2
  145. package/browser/chunk-Z7VU73IL.js +1 -0
  146. package/browser/{chunk-KMESGBCF.js → chunk-ZHQFVWJ7.js} +1 -1
  147. package/browser/{chunk-LNWKRTES.js → chunk-ZKHIA4CL.js} +1 -1
  148. package/browser/chunk-ZTD6TV46.js +19 -0
  149. package/browser/{chunk-EZHA56VR.js → chunk-ZZYPS4AS.js} +1 -1
  150. package/browser/index.html +3 -3
  151. package/browser/{main-N6JCXE66.js → main-I4RTGMKY.js} +6 -6
  152. package/browser/ngsw-config.json +1 -3
  153. package/browser/ngsw.json +546 -564
  154. package/package.json +1 -1
  155. package/browser/chunk-27AAXJEZ.js +0 -19
  156. package/browser/chunk-33G5WPLU.js +0 -1
  157. package/browser/chunk-3X4LLCCP.js +0 -4
  158. package/browser/chunk-4DOUGETW.js +0 -1
  159. package/browser/chunk-4XAUOTMC.js +0 -1
  160. package/browser/chunk-5IN3SXME.js +0 -1
  161. package/browser/chunk-74WJQD6C.js +0 -2
  162. package/browser/chunk-AB35TLNF.js +0 -1
  163. package/browser/chunk-AWRY2WI4.js +0 -1
  164. package/browser/chunk-C7FPPR3N.js +0 -1
  165. package/browser/chunk-EE3YE455.js +0 -1
  166. package/browser/chunk-GVVACBTP.js +0 -1
  167. package/browser/chunk-I365SIMI.js +0 -1
  168. package/browser/chunk-LKILXWEX.js +0 -11
  169. package/browser/chunk-ONP3DCYC.js +0 -1
  170. package/browser/chunk-PUBGTLD3.js +0 -1
  171. package/browser/chunk-Q2TR6T4X.js +0 -1
  172. package/browser/chunk-RDGMLBYX.js +0 -1
  173. package/browser/chunk-VFCL2DS3.js +0 -1
  174. package/browser/chunk-WFO4AMBS.js +0 -124
  175. package/browser/chunk-XAJYJKZY.js +0 -1
@@ -1 +1 @@
1
- import{a as J}from"./chunk-2J5N4H5L.js";import"./chunk-XX7AIWP2.js";import{f as z,g as G}from"./chunk-OZY277ZB.js";import"./chunk-AWENDKAA.js";import{a as H}from"./chunk-AB35TLNF.js";import"./chunk-3DC26I3D.js";import"./chunk-UHM2XEMM.js";import"./chunk-UQSKGZO5.js";import"./chunk-4BITXMRY.js";import"./chunk-2AOZZW2I.js";import"./chunk-TM2I5PAG.js";import"./chunk-JXEPD3CF.js";import"./chunk-PPMQE2JW.js";import"./chunk-UI32X6QC.js";import"./chunk-N5VS2V7L.js";import"./chunk-3V6FZIJD.js";import"./chunk-DEJ5V3PF.js";import"./chunk-T45W4CQR.js";import"./chunk-OK7LFGGQ.js";import"./chunk-VGLTFO5N.js";import"./chunk-UTSVZMZD.js";import"./chunk-BP6PECKT.js";import"./chunk-GNDUQZGK.js";import{a as B}from"./chunk-BKOMMH62.js";import"./chunk-7ESJNFN4.js";import"./chunk-JTDKDDTJ.js";import"./chunk-3TKWEWIY.js";import"./chunk-SXVOKLC4.js";import{A as W,F as q,c as j,h as I,p as A}from"./chunk-AJDQZ346.js";import"./chunk-TRJZVPIS.js";import"./chunk-YBESMONY.js";import"./chunk-YY6WVNU4.js";import"./chunk-PUBGTLD3.js";import"./chunk-PPTZHIIZ.js";import"./chunk-5U6KKKXF.js";import{n as V,q as k}from"./chunk-QGYXJUX3.js";import{$a as c,Db as l,Eb as a,Fb as o,Kb as _,Lb as v,Pb as L,Pd as O,Rd as P,Sb as w,Sd as N,Ua as r,Ub as s,Ud as R,cc as S,db as M,hc as d,ib as D,kd as T,mc as y,nc as x,oc as b,ra as p,sa as u,wb as C,xc as F,xd as E,yb as f,yc as h}from"./chunk-7D344CRC.js";import"./chunk-NF7PG5F2.js";var U=()=>["/menu/Setup/Tag/Landed_Cost"],K=i=>({"is-invalid":i});function X(i,g){i&1&&(a(0,"div"),d(1,"Name is required"),o())}function Y(i,g){if(i&1&&(a(0,"div",16),C(1,X,2,0,"div"),o()),i&2){s();let e=S(20);r(),f(e.hasError("required")?1:-1)}}function Z(i,g){if(i&1){let e=L();a(0,"mainpanel-cmp",1),_(1,2),a(2,"div")(3,"a",3),d(4,"Cancel"),o(),a(5,"button",4),w("click",function(){p(e);let n=s();return u(n.onSubmit("Setup/Tag/SubmitLandedCostTag"))}),d(6," Save "),o()(),v(),_(7,5),a(8,"div",6)(9,"div",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h3"),d(14,"General"),o()(),a(15,"div",11)(16,"div",12)(17,"div",8)(18,"div",13)(19,"input",14,0),b("ngModelChange",function(n){p(e);let m=s();return x(m.formData.Name,n)||(m.formData.Name=n),u(n)}),o(),a(21,"label",15),d(22,"Name"),o()(),C(23,Y,2,1,"div",16),o(),a(24,"div",8)(25,"div",17)(26,"textarea",18),b("ngModelChange",function(n){p(e);let m=s();return x(m.formData.Description,n)||(m.formData.Description=n),u(n)}),o(),a(27,"label",19),d(28,"Description"),o()()()()()()()()(),v(),o()}if(i&2){let e=S(20),t=s();l("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),r(3),l("routerLink",F(10,U)),r(2),l("disabled",!t.formData.Name),r(13),l("ngClass",h(11,K,e.invalid&&(e.dirty||e.touched))),r(),y("ngModel",t.formData.Name),l("ngClass",h(13,K,e.invalid&&(e.dirty||e.touched))),r(4),f(e.invalid&&(e.dirty||e.touched)?23:-1),r(3),y("ngModel",t.formData.Description)}}var Q=class i extends J{constructor(e,t,n,m,$){super(e,t,"Setup/Tag/LandedCostTagForm",n,"get");this.activatedRoute=n;this.router=m;this.toaster=$}activatedRoute;router;toaster;onSubmitSuccess(e){this.toaster.success("Success Submit Type Landed Cost Option Form",B.Success),this.router.navigate(["/menu/Setup/Tag/Landed_Cost"])}static \u0275fac=function(t){return new(t||i)(c(H),c(k),c(O),c(P),c(V))};static \u0275cmp=M({type:i,selectors:[["pos-landed-cost-option-form"]],features:[D],decls:1,vars:1,consts:[["name","ngModel"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["ngProjectAs","actions",5,["actions"]],["role","button",1,"btn","btn-outline-secondary","me-5",3,"routerLink"],["type","button","role","button",1,"btn","btn-success",3,"click","disabled"],["ngProjectAs","content",5,["content"]],[1,"container-fluid","pt-10","pb-10","bg-light-gray","h-100"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","d-flex","flex-column","gap-6"],[1,"form-floating-outline","mb-0",3,"ngClass"],["type","text","id","name","placeholder","Name","name","Name","required","",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","name"],[1,"invalid-feedback"],[1,"form-floating-outline","mb-0"],["id","desc","placeholder","Description",1,"form-control","mb-3",2,"margin","0px",3,"ngModelChange","ngModel"],["for","desc"]],template:function(t,n){t&1&&C(0,Z,29,15,"mainpanel-cmp",1),t&2&&f(n.data&&n.formData?0:-1)},dependencies:[E,T,q,j,I,W,A,R,N,G,z],styles:["[_nghost-%COMP%]{display:block}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{height:58px}textarea[_ngcontent-%COMP%]{resize:vertical}"]})};export{Q as LandedCostOptionFormComponent};
1
+ import{a as J}from"./chunk-2J5N4H5L.js";import"./chunk-XX7AIWP2.js";import{f as z,g as G}from"./chunk-FCP7EJWO.js";import"./chunk-2CBOQPZU.js";import{a as H}from"./chunk-SE37IZHT.js";import"./chunk-3DC26I3D.js";import"./chunk-UHM2XEMM.js";import"./chunk-UQSKGZO5.js";import"./chunk-4BITXMRY.js";import"./chunk-2AOZZW2I.js";import"./chunk-TM2I5PAG.js";import"./chunk-JXEPD3CF.js";import"./chunk-PPMQE2JW.js";import"./chunk-UI32X6QC.js";import"./chunk-N5VS2V7L.js";import"./chunk-3V6FZIJD.js";import"./chunk-DEJ5V3PF.js";import"./chunk-T45W4CQR.js";import"./chunk-OK7LFGGQ.js";import"./chunk-VGLTFO5N.js";import"./chunk-UTSVZMZD.js";import"./chunk-BP6PECKT.js";import"./chunk-GNDUQZGK.js";import{a as B}from"./chunk-BKOMMH62.js";import"./chunk-7ESJNFN4.js";import"./chunk-JTDKDDTJ.js";import"./chunk-3TKWEWIY.js";import"./chunk-SXVOKLC4.js";import{A as W,F as q,c as j,h as I,p as A}from"./chunk-AJDQZ346.js";import"./chunk-CW234Q5Q.js";import"./chunk-5NC22PJL.js";import"./chunk-YY6WVNU4.js";import"./chunk-H62QPUZY.js";import"./chunk-PPTZHIIZ.js";import"./chunk-OTNEWNB2.js";import{n as V,q as k}from"./chunk-QGYXJUX3.js";import{$a as c,Db as l,Eb as a,Fb as o,Kb as _,Lb as v,Pb as L,Pd as O,Rd as P,Sb as w,Sd as N,Ua as r,Ub as s,Ud as R,cc as S,db as M,hc as d,ib as D,kd as T,mc as y,nc as x,oc as b,ra as p,sa as u,wb as C,xc as F,xd as E,yb as f,yc as h}from"./chunk-7D344CRC.js";import"./chunk-NF7PG5F2.js";var U=()=>["/menu/Setup/Tag/Landed_Cost"],K=i=>({"is-invalid":i});function X(i,g){i&1&&(a(0,"div"),d(1,"Name is required"),o())}function Y(i,g){if(i&1&&(a(0,"div",16),C(1,X,2,0,"div"),o()),i&2){s();let e=S(20);r(),f(e.hasError("required")?1:-1)}}function Z(i,g){if(i&1){let e=L();a(0,"mainpanel-cmp",1),_(1,2),a(2,"div")(3,"a",3),d(4,"Cancel"),o(),a(5,"button",4),w("click",function(){p(e);let n=s();return u(n.onSubmit("Setup/Tag/SubmitLandedCostTag"))}),d(6," Save "),o()(),v(),_(7,5),a(8,"div",6)(9,"div",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h3"),d(14,"General"),o()(),a(15,"div",11)(16,"div",12)(17,"div",8)(18,"div",13)(19,"input",14,0),b("ngModelChange",function(n){p(e);let m=s();return x(m.formData.Name,n)||(m.formData.Name=n),u(n)}),o(),a(21,"label",15),d(22,"Name"),o()(),C(23,Y,2,1,"div",16),o(),a(24,"div",8)(25,"div",17)(26,"textarea",18),b("ngModelChange",function(n){p(e);let m=s();return x(m.formData.Description,n)||(m.formData.Description=n),u(n)}),o(),a(27,"label",19),d(28,"Description"),o()()()()()()()()(),v(),o()}if(i&2){let e=S(20),t=s();l("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),r(3),l("routerLink",F(10,U)),r(2),l("disabled",!t.formData.Name),r(13),l("ngClass",h(11,K,e.invalid&&(e.dirty||e.touched))),r(),y("ngModel",t.formData.Name),l("ngClass",h(13,K,e.invalid&&(e.dirty||e.touched))),r(4),f(e.invalid&&(e.dirty||e.touched)?23:-1),r(3),y("ngModel",t.formData.Description)}}var Q=class i extends J{constructor(e,t,n,m,$){super(e,t,"Setup/Tag/LandedCostTagForm",n,"get");this.activatedRoute=n;this.router=m;this.toaster=$}activatedRoute;router;toaster;onSubmitSuccess(e){this.toaster.success("Success Submit Type Landed Cost Option Form",B.Success),this.router.navigate(["/menu/Setup/Tag/Landed_Cost"])}static \u0275fac=function(t){return new(t||i)(c(H),c(k),c(O),c(P),c(V))};static \u0275cmp=M({type:i,selectors:[["pos-landed-cost-option-form"]],features:[D],decls:1,vars:1,consts:[["name","ngModel"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["ngProjectAs","actions",5,["actions"]],["role","button",1,"btn","btn-outline-secondary","me-5",3,"routerLink"],["type","button","role","button",1,"btn","btn-success",3,"click","disabled"],["ngProjectAs","content",5,["content"]],[1,"container-fluid","pt-10","pb-10","bg-light-gray","h-100"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","d-flex","flex-column","gap-6"],[1,"form-floating-outline","mb-0",3,"ngClass"],["type","text","id","name","placeholder","Name","name","Name","required","",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","name"],[1,"invalid-feedback"],[1,"form-floating-outline","mb-0"],["id","desc","placeholder","Description",1,"form-control","mb-3",2,"margin","0px",3,"ngModelChange","ngModel"],["for","desc"]],template:function(t,n){t&1&&C(0,Z,29,15,"mainpanel-cmp",1),t&2&&f(n.data&&n.formData?0:-1)},dependencies:[E,T,q,j,I,W,A,R,N,G,z],styles:["[_nghost-%COMP%]{display:block}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{height:58px}textarea[_ngcontent-%COMP%]{resize:vertical}"]})};export{Q as LandedCostOptionFormComponent};
@@ -1,4 +1,4 @@
1
- import{a as N,c as I}from"./chunk-TRJZVPIS.js";import{a as p}from"./chunk-PPTZHIIZ.js";import{$a as r,Db as o,Eb as c,Fb as l,Rd as C,Sd as M,Ua as n,Ub as h,Ud as D,db as S,gc as y,hc as u,jc as v,kd as g,wa as m,wb as b,xc as E,xd as f,yb as d,yc as a}from"./chunk-7D344CRC.js";var _=e=>({"pe-none":e}),O=()=>["/menu/Profile/Main/My_Subscription"],k=e=>({"text-decoration-none":e}),A=e=>({"text-capitalize":e});function L(e,i){if(e&1&&(c(0,"div",1)(1,"h5",2),u(2),c(3,"a",3)(4,"u",4)(5,"span",4),u(6,"please"),l(),u(7," process your payment! "),l()()()()),e&2){let t=h();y("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),n(2),v(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),n(),o("ngClass",a(7,_,t.isMySubscriptionMenu))("routerLink",E(9,O)),n(),o("ngClass",a(10,k,t.isMySubscriptionMenu)),n(),o("ngClass",a(12,A,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var x=class e{constructor(i,t,s){this.document=i;this.router=t;this.authService=s}document;router;authService;subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=N;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(i){return p.IsNotEmpty(i)}overrideCssStickyHeader(){if(p.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let i=`.sticky-top-thead th {
1
+ import{a as N,c as I}from"./chunk-CW234Q5Q.js";import{a as p}from"./chunk-PPTZHIIZ.js";import{$a as r,Db as o,Eb as c,Fb as l,Rd as C,Sd as M,Ua as n,Ub as h,Ud as D,db as S,gc as y,hc as u,jc as v,kd as g,wa as m,wb as b,xc as E,xd as f,yb as d,yc as a}from"./chunk-7D344CRC.js";var _=e=>({"pe-none":e}),O=()=>["/menu/Profile/Main/My_Subscription"],k=e=>({"text-decoration-none":e}),A=e=>({"text-capitalize":e});function L(e,i){if(e&1&&(c(0,"div",1)(1,"h5",2),u(2),c(3,"a",3)(4,"u",4)(5,"span",4),u(6,"please"),l(),u(7," process your payment! "),l()()()()),e&2){let t=h();y("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),n(2),v(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),n(),o("ngClass",a(7,_,t.isMySubscriptionMenu))("routerLink",E(9,O)),n(),o("ngClass",a(10,k,t.isMySubscriptionMenu)),n(),o("ngClass",a(12,A,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var x=class e{constructor(i,t,s){this.document=i;this.router=t;this.authService=s}document;router;authService;subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=N;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(i){return p.IsNotEmpty(i)}overrideCssStickyHeader(){if(p.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let i=`.sticky-top-thead th {
2
2
  top: 100px !important;
3
3
  z-index: 1020;
4
4
  }`;this.htmlBodyElement=this.document.getElementsByTagName("body")[0],this.htmlStyleElement=this.document.createElement("style"),this.htmlStyleElement.appendChild(this.document.createTextNode(i)),this.htmlBodyElement.appendChild(this.htmlStyleElement)}}initSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus(),this.subscriptionStatus=[{status:1,class:"alert-warning",message:"Your subscription is overdue. To avoid suspension, "},{status:2,class:"alert-danger",message:"Your subscription is partially suspended."},{status:3,class:"alert-danger",message:"Your subscription is suspended."}],this.subscriptionState=this.subscriptionStatus.filter(i=>i.status==this.currentSubStatus)[0]}ngOnDestroy(){this.htmlBodyElement&&this.htmlBodyElement.removeChild(this.htmlStyleElement)}static \u0275fac=function(t){return new(t||e)(r(m),r(C),r(I))};static \u0275cmp=S({type:e,selectors:[["subscription-alert"]],decls:1,vars:1,consts:[["role","alert",3,"class"],["role","alert"],[1,"fw-normal"],[1,"alert-link",3,"ngClass","routerLink"],[3,"ngClass"]],template:function(t,s){t&1&&b(0,L,8,14,"div",0),t&2&&d((s.subscriptionState==null?null:s.subscriptionState.status)==s.currentSubStatus&&s.isNotEmpty(s.currentSubStatus)?0:-1)},dependencies:[f,g,D,M],encapsulation:2})};export{x as a};
@@ -0,0 +1,2 @@
1
+ import{a as Ji}from"./chunk-5IB4NAOH.js";import{a as At}from"./chunk-GWNGKIUL.js";import{a as Vt,b as Rt}from"./chunk-NOXFZLVJ.js";import"./chunk-BJCHUBGO.js";import{e as Pi}from"./chunk-MBSYHKPE.js";import{a as rt}from"./chunk-QQUWUBWQ.js";import{a as pe}from"./chunk-52U2QQ43.js";import{a as je,b as Nt}from"./chunk-P2NWTCME.js";import{a as ki}from"./chunk-KYGLZJ57.js";import{a as Fi,b as Vi,c as Ri}from"./chunk-F76MWCWQ.js";import{a as Oi}from"./chunk-XX7AIWP2.js";import{p as we}from"./chunk-SCH7M36Q.js";import"./chunk-7TQOVQ3O.js";import"./chunk-G53IMHKY.js";import"./chunk-3EAA4CUP.js";import"./chunk-5U2B2SGN.js";import"./chunk-YJV74F2X.js";import"./chunk-WPCHBRKW.js";import{a as Te,b as Bi}from"./chunk-A7VRBYLB.js";import{a as Ui,b as Gi}from"./chunk-WUR7UGG2.js";import{b as wi,d as Ft}from"./chunk-ANFR3NR4.js";import{c as $i,d as ji}from"./chunk-PZSSTNYS.js";import"./chunk-YHZEJWGM.js";import{a as Lt}from"./chunk-WHKDTNK2.js";import{b as zi,c as qi}from"./chunk-WM2CE23W.js";import{d as Bt}from"./chunk-M43FFEY2.js";import"./chunk-5VC2XYC5.js";import{a as $e}from"./chunk-RWOSYWIC.js";import"./chunk-ROZU3QVN.js";import"./chunk-4J6MO575.js";import"./chunk-ONECCHQ5.js";import"./chunk-GKGUNK27.js";import{a as le}from"./chunk-G56UPMKR.js";import"./chunk-XBINTEVI.js";import"./chunk-BAIS4TWD.js";import"./chunk-QSFZAHQ2.js";import"./chunk-TGQEO6S3.js";import"./chunk-ONKLHHM3.js";import"./chunk-X2OQT5MH.js";import"./chunk-XTOFMSDQ.js";import"./chunk-ZM456L6A.js";import"./chunk-F5JDPCBG.js";import"./chunk-LN7LGRLI.js";import"./chunk-EP7SKSJT.js";import"./chunk-LAQZXTBX.js";import{a as ze}from"./chunk-XISCWQFV.js";import{f as xe,g as kt}from"./chunk-FCP7EJWO.js";import"./chunk-2CBOQPZU.js";import{a as Ce}from"./chunk-SE37IZHT.js";import"./chunk-3DC26I3D.js";import"./chunk-UHM2XEMM.js";import"./chunk-UQSKGZO5.js";import"./chunk-4BITXMRY.js";import"./chunk-2AOZZW2I.js";import"./chunk-TM2I5PAG.js";import{a as ue,b as We}from"./chunk-JXEPD3CF.js";import"./chunk-PPMQE2JW.js";import{B as Ai,F as Hi,G as Ot,I as Wi,O as de,g as De,l as Li}from"./chunk-UI32X6QC.js";import"./chunk-OVCNCVGF.js";import"./chunk-PWMMCY25.js";import"./chunk-OKQYRKDJ.js";import{d as fe}from"./chunk-BUIP3UCE.js";import"./chunk-SIAVPMSP.js";import{f as ot}from"./chunk-N5VS2V7L.js";import{a as be,b as Ee,c as _e,h as Ni}from"./chunk-3V6FZIJD.js";import"./chunk-DEJ5V3PF.js";import"./chunk-T45W4CQR.js";import"./chunk-OK7LFGGQ.js";import"./chunk-VGLTFO5N.js";import"./chunk-UTSVZMZD.js";import"./chunk-BP6PECKT.js";import"./chunk-GNDUQZGK.js";import"./chunk-7KKUTTZ3.js";import"./chunk-ZS4XLRDB.js";import"./chunk-TYEI4SD2.js";import{a as oe,b as ve,c as re}from"./chunk-BKOMMH62.js";import"./chunk-7ESJNFN4.js";import"./chunk-JTDKDDTJ.js";import"./chunk-3TKWEWIY.js";import"./chunk-SXVOKLC4.js";import{A as Ii,F as at,G as Pt,b as wt,c as ae,h as Y,p as K}from"./chunk-AJDQZ346.js";import"./chunk-CW234Q5Q.js";import"./chunk-5NC22PJL.js";import{a as Ti}from"./chunk-YY6WVNU4.js";import{b as Ie}from"./chunk-H62QPUZY.js";import{a as ee}from"./chunk-PPTZHIIZ.js";import"./chunk-OTNEWNB2.js";import{n as X,q as te}from"./chunk-QGYXJUX3.js";import{$ as gi,$a as D,Ab as H,Ac as He,Ba as E,Bb as k,Cb as B,Db as c,E as Ae,Ea as hi,Eb as i,Fa as ye,Fb as o,Fc as p,Gb as f,Gc as C,Hb as St,Hc as y,Ib as ht,Ic as Mt,J as Ge,Jb as vi,Jc as di,Lc as it,M as Ke,Na as w,Oc as Mi,Pb as I,Pd as nt,Rd as Tt,Sb as v,Sc as si,Sd as q,Tc as M,Ua as a,Ub as m,Ud as Qe,Y as gt,aa as Et,ca as Je,cc as bi,db as N,dc as Dt,e as Be,ea as Le,eb as et,ec as Ei,ga as ri,gc as $,hc as l,ib as G,ic as b,jb as tt,jc as x,ka as Si,kc as he,kd as ce,l as Ye,la as Ze,mc as P,nc as F,oa as j,oc as V,qd as It,ra as S,s as me,sa as h,sd as U,t as xi,ud as ie,vb as li,w as ai,wb as u,wc as Di,xb as yi,xc as z,xd as ne,yb as _,yc as T,zc as Q}from"./chunk-7D344CRC.js";import{a as O,b as A}from"./chunk-NF7PG5F2.js";function cn(t,d){t&1&&(i(0,"span",8),l(1,"Mandatory"),o())}var Ht=class t{constructor(d,e,n){this.dialogRef=d;this.data=e;this.toastr=n;this.Form={},this.modalConfig.title="Closing Note",this.modalConfig.customWidth="350px",this.Form.Note=""}dialogRef;data;toastr;modalConfig=new ve;Form={};VistorMandatory=!1;onOk(){if(this.data.VisitorMandatory&&ee.IsEmpty(this.Form.Visitors)){this.toastr.error("Visitor is mandatory",oe.Error);return}this.dialogRef.close({Data:this.Form})}static \u0275fac=function(e){return new(e||t)(D(be),D(Ee),D(X))};static \u0275cmp=N({type:t,selectors:[["modal-close"]],standalone:!1,decls:12,vars:5,consts:[["visitor","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"row","row-gap-8"],[1,"col-sm-12"],[3,"ngModelChange","ngModel"],[1,"form-floating-outline"],["type","text","autoNum","","name","visitor",1,"form-control",3,"ngModelChange","required","ngModel"],["for","visitor"],[1,"control-label",2,"color","red"]],template:function(e,n){if(e&1){let r=I();i(0,"modal-material",1),v("onOk",function(){return n.onOk()})("onCancel",function(){return n.dialogRef.close()})("onClose",function(){return n.dialogRef.close()}),i(1,"content")(2,"div",2)(3,"div",3)(4,"POS-tinymce-editor",4),V("ngModelChange",function(g){return S(r),F(n.Form.Note,g)||(n.Form.Note=g),h(g)}),o()(),i(5,"div",3)(6,"div",5)(7,"input",6,0),V("ngModelChange",function(g){return S(r),F(n.Form.Visitors,g)||(n.Form.Visitors=g),h(g)}),o(),i(9,"label",7),l(10,"Visitors"),o(),u(11,cn,2,0,"span",8),o()()()()()}if(e&2){let r=bi(8);c("config",n.modalConfig),a(4),P("ngModel",n.Form.Note),a(3),c("required",n.data.VisitorMandatory),P("ngModel",n.Form.Visitors),a(4),_(r.invalid&&(r.dirty||r.touched)?11:-1)}},dependencies:[ae,Y,Ii,K,re,le,At],encapsulation:2})};var Qi=t=>({selected:t}),$t=class t{constructor(d,e,n){this.dialogRef=d;this.data=e;this.toastr=n;this.Form.set(this.data.Form),this.LabelExpense.set(e.LabelExpense),this.PaymentList.set(e.PaymentList),this.expenseList.set(this.data.expenseList)}dialogRef;data;toastr;Form=E(new yt);LabelExpense=E([]);PaymentList=E([]);expense=E({});ID=E("");expenseList=E([]);config=E(new ve);ngOnInit(){this.config.update(d=>A(O({},d),{title:"Expense Detail"}))}onOk(){if(ee.IsEmpty(this.Form()?.ExpenseID)){this.toastr.warning("Label cannot be empty.","Input Required");return}if(ee.IsEmpty(this.Form()?.PaymentID)){this.toastr.warning("Payment Method cannot be empty.","Input Required");return}this.Form()?.Amount==null?(this.toastr.error("Please enter a value on amount field",oe.Error),this.Form.set(null)):this.Form()?.PaymentID==null&&(this.toastr.error("Please enter a value on payment method field",oe.Error),this.Form.set(null)),this.dialogRef.close({Data:this.Form()})}IsNotEmpty(d){return d!=null&&d!=null&&d!=""}updateExpense(d){this.expense.set(d)}chaneExpense(){let d=this.LabelExpense().filter(e=>e.ID==this.Form()?.ExpenseID);this.Form.update(e=>O(O({},e),d[0]))}chanePayment(){let d=this.PaymentList().find(e=>e.ID==this.Form()?.PaymentID);this.Form.update(e=>A(O({},e),{PaymentName:d.Name}))}static \u0275fac=function(e){return new(e||t)(D(be),D(Ee),D(X))};static \u0275cmp=N({type:t,selectors:[["modal-expense"]],standalone:!1,decls:26,vars:14,consts:[[3,"onOk","onClose","onCancel","config"],[2,"width","350px"],[1,"row",3,"hidden"],[1,"col-sm-6"],[1,"form-floating-outline",3,"ngClass"],["id","label","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"change","ngModelChange","ngModel","items"],["for","label"],["id","payment","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"change","ngModelChange","ngModel","items"],["for","payment"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","name","Amount","autoNum","","autofocus","",1,"form-control",3,"ngModelChange","ngModel"],["for","amount"],["rows","5","id","desc","placeholder","Note",1,"form-control","w-100",3,"ngModelChange","ngModel"],["for","desc"]],template:function(e,n){e&1&&(i(0,"modal-material",0),v("onOk",function(){return n.onOk()})("onClose",function(){return n.dialogRef.close()})("onCancel",function(){return n.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"ng-select",5),v("change",function(){return n.chaneExpense()}),V("ngModelChange",function(s){return F(n.Form().ExpenseID,s)||(n.Form().ExpenseID=s),s}),o(),i(7,"label",6),l(8,"Select Label"),o()()(),i(9,"div",3)(10,"div",4)(11,"ng-select",7),v("change",function(){return n.chanePayment()}),V("ngModelChange",function(s){return F(n.Form().PaymentID,s)||(n.Form().PaymentID=s),s}),o(),i(12,"label",8),l(13,"Payment Method"),o()()()(),i(14,"div",9)(15,"div",10)(16,"div",11)(17,"input",12),V("ngModelChange",function(s){return F(n.Form().Amount,s)||(n.Form().Amount=s),s}),o(),i(18,"label",13),l(19,"Amount"),o()()()(),i(20,"div",9)(21,"div",10)(22,"div",11)(23,"textarea",14),V("ngModelChange",function(s){return F(n.Form().Note,s)||(n.Form().Note=s),s}),o(),i(24,"label",15),l(25,"Note"),o()()()()()()()),e&2&&(c("config",n.config()),a(3),c("hidden",n.LabelExpense().length<0),a(2),c("ngClass",T(10,Qi,n.IsNotEmpty(n.Form().ExpenseID))),a(),P("ngModel",n.Form().ExpenseID),c("items",n.LabelExpense()),a(4),c("ngClass",T(12,Qi,n.IsNotEmpty(n.Form().PaymentID))),a(),P("ngModel",n.Form().PaymentID),c("items",n.PaymentList()),a(6),P("ngModel",n.Form().Amount),a(6),P("ngModel",n.Form().Note))},dependencies:[ce,ae,Y,K,re,fe,le],encapsulation:2,changeDetection:0})},yt=class{ID;AccountID;Amount;PaymentID;PaymentName;Name;Note;ExpenseID;constructor(){this.AccountID,this.Amount,this.PaymentID,this.PaymentName,this.Name,this.Note,this.ExpenseID}};var st=class t{dialogRef=j(be);modalConfig=new ve;data=j(Ee);maxDaysRange=E(this.data.maximumDaysRange);openDate=E(this.data.openDate);differentInDays=E(ee.differentInDays(this.data.openDate,new Date)+1);constructor(){this.modalConfig.title="Unable to Close Shift",this.modalConfig.headerType=oe.Warning,this.modalConfig.customWidth="350px",this.modalConfig.hideFooter=!0}ngOnInit(){}onClose(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=N({type:t,selectors:[["app-modal-warning-exceedMaximumDays"]],decls:25,vars:3,consts:[[3,"onCancel","onClose","config"],[1,"text-center"],[1,"alert","alert-warning","d-flex","align-items-center",2,"background-color","#fefbf2","border-left","4px solid #ffa500","border-radius","0.5rem","padding","1rem","margin-top","20px","margin-bottom","20px"],[1,"mb-0","d-flex",2,"font-size","0.75rem","color","#374151"],[1,"fa-solid","fa-circle-exclamation","me-2",2,"color","#e89600"],[1,"fw-bold","no-wrap"],[2,"font-weight","600","color","#e89600"],[1,"text-center","mb-3",2,"font-size","0.75rem","color","#6c757d"],["href","https://support.dealpos.com/en/articles/7856686-maximum-days-for-shift-closure","target","_blank","onmouseover","this.style.backgroundColor = '#dbeafe'","onmouseout","this.style.backgroundColor = '#eff6ff'",1,"d-flex","align-items-center","justify-content-center","rounded",2,"gap","0.2rem","padding","0.625rem 1rem","background-color","#eff6ff","transition","background-color 0.2s"],["onmouseover","this.style.color = '#1d4ed8'","onmouseout","this.style.color = '#2563eb'",2,"font-size","0.75rem","font-weight","500","color","#2563eb","transition","color 0.2s"],[1,"fa-solid","fa-arrow-up-right-from-square","mb-1",2,"color","#2563eb","font-size","0.75rem"]],template:function(e,n){e&1&&(i(0,"modal-material",0),v("onCancel",function(){return n.onClose()})("onClose",function(){return n.onClose()}),i(1,"content")(2,"div")(3,"p",1),l(4),o(),i(5,"div",2)(6,"div",3)(7,"div"),f(8,"i",4),o(),i(9,"div")(10,"span",5),l(11,"Action required:"),o(),l(12," Please contact your "),i(13,"span",6),l(14,"Full Access Admin"),o(),l(15," to close the shift from the "),i(16,"span",6),l(17,"Register menu"),o(),l(18,". "),o()()(),i(19,"p",7),l(20," Learn more about shift closure limits "),o(),i(21,"a",8)(22,"span",9),l(23,"Article"),o(),f(24,"i",10),o()()()()),e&2&&(c("config",n.modalConfig),a(4),he(" This shift was opened ",n.differentInDays()," days ago. The maximum days between open and close shift is ",n.maxDaysRange()," Days. "))},dependencies:[re],encapsulation:2})};var mi=(t,d)=>({"col-4":t,"col-3":d});function un(t,d){if(t&1&&(i(0,"p",10),l(1),o()),t&2){let e=m();a(),x(" ",e.VoidInvoice().length," Void ")}}function _n(t,d){t&1&&(i(0,"h1",5),f(1,"i",19),o())}function fn(t,d){if(t&1&&(i(0,"div",20),l(1),p(2,"amountFraction"),o()),t&2){let e=m(2);Ei("text-success",e.Sales()+e.Surcharge()+e.Tax()>0)("text-danger",e.Sales()+e.Surcharge()+e.Tax()<0),a(),he(" ",e.CurrencySymbol()," ",C(2,6,e.Sales()+e.Surcharge()+e.Tax())," ")}}function Cn(t,d){if(t&1&&(i(0,"div",15)(1,"div",21)(2,"div",22),l(3,"Sales :"),o(),i(4,"div",23),l(5),p(6,"amountFraction"),o()(),i(7,"div",21)(8,"div",22),l(9,"Tax :"),o(),i(10,"div",23),l(11),p(12,"amountFraction"),o()(),i(13,"div",24)(14,"div",22),l(15,"Surcharge :"),o(),i(16,"div",23),l(17),p(18,"amountFraction"),o()()()),t&2){let e=m(2);a(4),c("matTooltip",e.getVoidTooltip("sales")),a(),he(" ",e.CurrencySymbol()," ",C(6,9,e.Sales())," "),a(5),c("matTooltip",e.getVoidTooltip("tax")),a(),he(" ",e.CurrencySymbol()," ",C(12,11,e.Tax())," "),a(5),c("matTooltip",e.getVoidTooltip("surcharge")),a(),he(" ",e.CurrencySymbol()," ",C(18,13,e.Surcharge())," ")}}function xn(t,d){if(t&1){let e=I();i(0,"div",13)(1,"div",3)(2,"div",4),u(3,_n,2,0,"h1",5),i(4,"h5",7),l(5),o()(),i(6,"div",8),u(7,fn,3,8,"div",14)(8,Cn,19,15,"div",15),i(9,"h5",16)(10,"button",17),v("click",function(){S(e);let r=m();return h(r.showTotalDetail())}),i(11,"small"),f(12,"i",18),l(13),o()()()()()()}if(t&2){let e=m();a(3),_(e.isShowTotalDetail()?-1:3),a(2),x(" ",e.isShowTotalDetail()?"Total Sales Details":"Total"," "),a(2),_(e.isShowTotalDetail()?8:7),a(6),x(" ",e.isShowTotalDetail()?"View Summary":"View Details"," ")}}var Me=class t{constructor(d){this.amountFractionPipe=d}amountFractionPipe;Name=M();OutletName=M();RegisterName=M();Start=M();End=M();Invoices=M();VoidInvoice=M();Sales=M();Surcharge=M();Tax=M();StartDate=M();EndDate=M();CurrencySymbol=M();totalSalesVisible=M(!0);datePipe=j(U);isShowTotalDetail=E(!1);showTotalDetail(){this.isShowTotalDetail.update(d=>!d)}get StartEndDate(){try{let d=this.datePipe.transform(this.StartDate(),"MMM d, yyyy"),e=this.datePipe.transform(this.EndDate(),"MMM d, yyyy"),n=this.datePipe.transform(this.StartDate(),"yyyy"),r=this.datePipe.transform(this.EndDate(),"yyyy"),s=this.datePipe.transform(this.StartDate(),"MMM"),g=this.datePipe.transform(this.EndDate(),"MMM"),L=this.datePipe.transform(this.StartDate(),"d"),W=this.datePipe.transform(this.EndDate(),"d");return n!==r?d===e||!e&&d&&d.trim()!==""?d||"":`${d||""} - ${e||""}`:!e||d===e?d||"":s===g?`${L} - ${W} ${s} ${n}`:`${L} ${s} \u2013 ${W} ${g} ${n}`}catch(d){return""}}get DisplayOutletAndRegisterName(){return this.OutletName()!=this.RegisterName()&&this.RegisterName()?`${this.OutletName()} / ${this.RegisterName()}`:`${this.OutletName()}`}getSalesTooltip(d){let e="",n=d;return this.sumVoidedSales&&this.sumVoidedSales>0&&(e+=`Voided Sales: ${this.CurrencySymbol()} ${n}`),e}getTaxTooltip(d){let e="",n=d;return this.sumVoidedTax&&this.sumVoidedTax>0&&(e+=`Voided Tax: ${this.CurrencySymbol()} ${n}`),e}getSurchargeTooltip(d){let e="",n=d;return this.sumVoidedSurcharge&&this.sumVoidedSurcharge>0&&(e+=`Voided Surcharge: ${this.CurrencySymbol()} ${n}`),e}getVoidTooltip(d){let e="",n=this.sumVoidedSales,r=this.sumVoidedTax,s=this.sumVoidedSurcharge;switch(d){case"sales":e+=n&&n>0?`Voided Sales: ${this.CurrencySymbol()} ${this.amountFractionPipe.transform(n)}`:"";break;case"tax":e+=r&&r>0?`Voided Tax: ${this.CurrencySymbol()} ${this.amountFractionPipe.transform(r)}`:"";break;case"surcharge":e+=s&&s>0?`Voided Surcharge: ${this.CurrencySymbol()} ${this.amountFractionPipe.transform(s)}`:"";break}return e}get sumVoidedSales(){return this.VoidInvoice().reduce((d,e)=>d+Number(e.Sales||0),0)}get sumVoidedTax(){return this.VoidInvoice().reduce((d,e)=>d+Number(e.Tax||0),0)}get sumVoidedSurcharge(){return this.VoidInvoice().reduce((d,e)=>d+Number(e.Surcharge||0),0)}static \u0275fac=function(e){return new(e||t)(D(pe))};static \u0275cmp=N({type:t,selectors:[["POS-shift-detail-card"]],inputs:{Name:[1,"Name"],OutletName:[1,"OutletName"],RegisterName:[1,"RegisterName"],Start:[1,"Start"],End:[1,"End"],Invoices:[1,"Invoices"],VoidInvoice:[1,"VoidInvoice"],Sales:[1,"Sales"],Surcharge:[1,"Surcharge"],Tax:[1,"Tax"],StartDate:[1,"StartDate"],EndDate:[1,"EndDate"],CurrencySymbol:[1,"CurrencySymbol"],totalSalesVisible:[1,"totalSalesVisible"]},features:[Di([pe])],decls:41,vars:31,consts:[[1,"row-container"],[1,"row","shift-info"],[1,"d-flex"],[1,"card","custom-card","pt-4","w-100"],[1,"card-header"],[1,"text-center",2,"color","#bdbdbd"],["aria-hidden","true",1,"fa-regular","fa-user","fa-xl"],[1,"text-center","text-muted","text-uppercase",2,"margin-top","26px"],[1,"card-body"],[1,"text-center","fw-bold"],[1,"text-muted","text-center",2,"margin-top","6px"],["aria-hidden","true",1,"fa-regular","fa-clock","fa-xl"],["aria-hidden","true",1,"fa-regular","fa-file","fa-xl"],[1,"col-3","d-flex"],[1,"text-center","fw-bold","h4",3,"text-success","text-danger"],[2,"padding-left","8px","padding-right","8px"],[1,"text-muted","text-center",2,"margin-top","10px"],[1,"btn","btn-light","p-1","pe-3","m-0","align-baseline",3,"click"],[1,"fa-solid","fa-chevron-left","me-1"],["aria-hidden","true",1,"fas","fa-money-bill-alt","fa-xl"],[1,"text-center","fw-bold","h4"],[1,"row"],[1,"col-6","text-muted","fw-semibold"],["matTooltipPosition","above",1,"col-6","fw-semibold","text-end",3,"matTooltip"],[1,"row","mb-2"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"h1",5),f(6,"i",6),o(),i(7,"h5",7),l(8," Cashier "),o()(),i(9,"div",8)(10,"h4",9),l(11),o(),i(12,"p",10),l(13),o()()()(),i(14,"div",2)(15,"div",3)(16,"div",4)(17,"h1",5),f(18,"i",11),o(),i(19,"h5",7),l(20," Shift Time "),o()(),i(21,"div",8)(22,"h4",9),l(23),p(24,"date"),p(25,"date"),o(),i(26,"p",10),l(27),o()()()(),i(28,"div",2)(29,"div",3)(30,"div",4)(31,"h1",5),f(32,"i",12),o(),i(33,"h5",7),l(34," Invoices "),o()(),i(35,"div",8)(36,"h4",9),l(37),p(38,"number"),o(),u(39,un,2,1,"p",10),o()()(),u(40,xn,14,4,"div",13),o()()),e&2&&(a(2),$(Q(22,mi,!n.totalSalesVisible(),n.totalSalesVisible())),a(9),x(" ",n.Name()," "),a(2),x(" ",n.DisplayOutletAndRegisterName," "),a(),$(Q(25,mi,!n.totalSalesVisible(),n.totalSalesVisible())),a(9),he(" ",y(24,14,n.Start(),"HH:mm")," - ",y(25,17,n.End(),"HH:mm")," "),a(4),x(" ",n.StartEndDate," "),a(),$(Q(28,mi,!n.totalSalesVisible(),n.totalSalesVisible())),a(9),x(" ",C(38,20,n.Invoices().length)," Total "),a(2),_(n.VoidInvoice().length>0?39:-1),a(),_(n.totalSalesVisible()?40:-1))},dependencies:[de,ne,We,ue,pe,ie,U],styles:['.row-container[_ngcontent-%COMP%]{width:100%;position:relative}.shift-info[_ngcontent-%COMP%]{margin-top:12px;margin-bottom:12px}@media(max-width:999px){.shift-info[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{height:130px}.shift-info[_ngcontent-%COMP%]{margin-bottom:12px}}.custom-card[_ngcontent-%COMP%]{position:relative;border-radius:12px;transition:all .3s ease-in-out;background:#fff!important;padding-bottom:0;margin-bottom:0}.custom-card[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-1px;left:0;width:100%;height:7px;background-color:#bdbdbd;border-radius:12px 12px 0 0;z-index:1}.custom-card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 20px #d6d6d64d;transform:translateY(-2px);background:linear-gradient(to right,rgba(214,214,214,.08) 0%,rgba(214,214,214,.03) 50% rgba(255,255,255,.95) 100%)!important}.custom-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%], .custom-card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{background:transparent!important;position:relative;z-index:2}'],changeDetection:0})};var pt=class t{title=M();message=M();path=M();buttonText=M();icon=M();fragment=M();static \u0275fac=function(e){return new(e||t)};static \u0275cmp=N({type:t,selectors:[["POS-shift-card-warning"]],inputs:{title:[1,"title"],message:[1,"message"],path:[1,"path"],buttonText:[1,"buttonText"],icon:[1,"icon"],fragment:[1,"fragment"]},decls:11,vars:7,consts:[[1,"d-flex","justify-content-center","align-items-center","card-warning-wrapper"],[1,"card","custom-card","pt-4",2,"pointer-events","none"],[1,"card-body","d-flex","align-items-center","justify-content-center",2,"flex-direction","column","gap","16px"],[1,"text-center"],["aria-hidden","true"],[1,"text-muted","text-center"],[1,"btn","btn-success","text-uppercase","font-semibold",2,"pointer-events","auto",3,"routerLink","fragment"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),f(4,"i",4),o(),i(5,"h2",3),l(6),o(),i(7,"h4",5),l(8),o(),i(9,"a",6),l(10),o()()()()),e&2&&(a(4),$(n.icon()),a(2),b(n.title()),a(2),x(" ",n.message()," "),a(),c("routerLink",n.path())("fragment",n.fragment()),a(),b(n.buttonText()))},dependencies:[q],styles:[".card-warning-wrapper[_ngcontent-%COMP%]{width:100%;flex-grow:1;background-color:#fff;height:500px}.custom-card[_ngcontent-%COMP%]{position:relative;width:40%;height:300px;background:#fff;border-radius:30px;box-shadow:0 4px 12px #00000014;border-top:8px solid #87cb16;padding-left:20px;padding-right:20px}"],changeDetection:0})};var zt=class t{http=j(te);cache=new Map;getDataOnDemand(d,e=null,n=null,r=null,s=null){let g=JSON.stringify([d,e,n,r,s]);return this.cache.has(g)?Ye(this.cache.get(g)):this.http.post(d,{RegisterID:e,Start:n,End:r,SessionID:s}).pipe(Le(L=>this.cache.set(g,L)))}clearCache(){this.cache.clear()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Si({token:t,factory:t.\u0275fac,providedIn:"root"})};var Se=class{shiftFormService=j(zt);responseData=E(null);getData(d=null,e=null,n=null,r=null){this.shiftFormService.getDataOnDemand(this.apiUrl,d,e,n,r).pipe(Le(s=>{this.responseData.set(s)})).subscribe()}};var gn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],Sn=t=>({ID:t});function hn(t,d){if(t&1&&(i(0,"tr"),f(1,"td",12),i(2,"td")(3,"a",13),l(4),o()(),i(5,"td"),l(6),o(),i(7,"td"),l(8),p(9,"date"),o(),i(10,"td"),l(11),p(12,"IsMinDate"),o(),i(13,"td",10),l(14),p(15,"amountFraction"),o(),i(16,"td"),l(17),o()()),t&2){let e=d.$implicit,n=d.$index;a(),c("innerHTML",n+1,w),a(2),c("routerLink",z(17,gn))("queryParams",T(18,Sn,e.ID)),a(),x(" ",e.Number," "),a(2),b(e.CompleteName),a(2),x(" ",y(9,9,e.Date,"dd MMM yyyy")," "),a(3),x(" ",y(12,12,e.Due,"dd MMM yyyy")," "),a(3),x(" ",C(15,15,e.SalesNTax)," "),a(3),x(" ",e.Payment," ")}}function yn(t,d){if(t&1&&k(0,hn,18,20,"tr",null,H),t&2){let e=m();B(e.responseData())}}function vn(t,d){t&1&&(i(0,"tr")(1,"td",14),f(2,"app-empty-state"),o()())}var Fe=class t extends Se{apiUrl="/api/shift/voided-invoices";RegisterID=M("");SessionID=M(null);Start=M("");End=M(null);ngOnInit(){this.getData(this.RegisterID(),this.Start(),this.End(),this.SessionID())}static \u0275fac=(()=>{let d;return function(n){return(d||(d=ye(t)))(n||t)}})();static \u0275cmp=N({type:t,selectors:[["POS-voided-invoice"]],inputs:{RegisterID:[1,"RegisterID"],SessionID:[1,"SessionID"],Start:[1,"Start"],End:[1,"End"]},features:[G],decls:35,vars:7,consts:[[1,"row","g-0"],[1,"col-12"],[1,"card","me-5"],[1,"card-body"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end",2,"width","20px"],[1,"border-end"],[1,"border-end","text-end"],["colspan","5",1,"text-end"],[1,"text-end"],["colspan","2"],[3,"innerHTML"],["target","_blank",1,"text-primary",3,"routerLink","queryParams"],["colspan","7",1,"text-center"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),l(8,"No"),o(),i(9,"th",7),l(10,"Number"),o(),i(11,"th",7),l(12,"Customer"),o(),i(13,"th",7),l(14,"Date"),o(),i(15,"th",7),l(16,"Due"),o(),i(17,"th",8),l(18,"Sales"),o(),i(19,"th",7),l(20,"Payment"),o()()(),i(21,"tbody"),u(22,yn,2,0)(23,vn,3,0,"tr"),o(),i(24,"tfoot")(25,"tr")(26,"td",9)(27,"b"),l(28,"Total :"),o()(),i(29,"td",10)(30,"b"),l(31),p(32,"sum"),p(33,"amountFraction"),o()(),f(34,"td",11),o()()()()()()()),e&2&&(a(22),_(n.responseData()&&n.responseData().length>0?22:23),a(9),b(C(33,5,y(32,2,n.responseData(),"SalesNTax"))))},dependencies:[de,ne,q,rt,De,Ot,U,Te],encapsulation:2})};var bn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],En=t=>({ID:t});function Dn(t,d){if(t&1&&(i(0,"tr"),f(1,"td",9),i(2,"td"),l(3),p(4,"date"),o(),i(5,"td")(6,"a",10),l(7),o()(),i(8,"td",11),l(9),p(10,"number"),o()()),t&2){let e=d.$implicit,n=d.$index;a(),c("innerHTML",n+1,w),a(2),x(" ",y(4,6,e.Created,"dd MMM yyyy")," "),a(3),c("routerLink",z(11,bn))("queryParams",T(12,En,e.InvoiceID)),a(),x(" ",e.InvoiceNumber," "),a(2),x(" ",C(10,9,e.Earned*-1)," ")}}function Mn(t,d){if(t&1&&k(0,Dn,11,14,"tr",null,H),t&2){let e=m();B(e.responseData())}}function In(t,d){t&1&&(i(0,"tr")(1,"td",12),f(2,"app-empty-state"),o()())}var Ve=class t extends Se{apiUrl="/api/shift/loyalty-points";RegisterID=M("");SessionID=M(null);Start=M("");End=M(null);ngOnInit(){this.getData(this.RegisterID(),this.Start(),this.End(),this.SessionID())}static \u0275fac=(()=>{let d;return function(n){return(d||(d=ye(t)))(n||t)}})();static \u0275cmp=N({type:t,selectors:[["POS-loyalty-point"]],inputs:{RegisterID:[1,"RegisterID"],SessionID:[1,"SessionID"],Start:[1,"Start"],End:[1,"End"]},features:[G],decls:18,vars:1,consts:[[1,"row","g-0"],[1,"col-sm-12"],[1,"card","border-top-0"],[1,"card-body"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end",2,"width","20px"],[1,"border-end"],[1,"border-end","text-end"],[3,"innerHTML"],["target","_blank",1,"text-primary",3,"routerLink","queryParams"],[1,"text-end"],["colspan","4",1,"text-center"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),l(8,"No"),o(),i(9,"th",7),l(10,"Date"),o(),i(11,"th",7),l(12,"Number"),o(),i(13,"th",8),l(14,"Point"),o()()(),i(15,"tbody"),u(16,Mn,2,0)(17,In,3,0,"tr"),o()()()()()()),e&2&&(a(16),_(n.responseData()&&n.responseData().length>0?16:17))},dependencies:[ne,de,q,rt,ie,U],encapsulation:2})};var Tn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],wn=t=>({ID:t});function Pn(t,d){if(t&1&&(i(0,"tr"),f(1,"td",12),i(2,"td")(3,"a",13),f(4,"b",12),o()(),f(5,"td",12),p(6,"date"),f(7,"td",12)(8,"td",11),p(9,"quantityFraction"),f(10,"td",11),p(11,"amountFraction"),i(12,"td",9),l(13),p(14,"amountFraction"),o()()),t&2){let e=d.$implicit,n=d.$index;a(),c("innerHTML",n+1,w),a(2),c("routerLink",z(18,Tn))("queryParams",T(19,wn,e.InvoiceID)),a(),c("innerHTML",e.Number,w),a(),c("innerHTML",y(6,9,e.Created,"dd MMM yyyy"),w),a(2),c("innerHTML",e.CustomerName,w),a(),c("innerHTML",C(9,12,e.Quantity),w),a(2),c("innerHTML",C(11,14,e.UnitPrice),w),a(3),x(" ",C(14,16,e.Sales)," ")}}var Re=class t extends Se{apiUrl="/api/shift/sales-return";RegisterID=M("");SessionID=M(null);Start=M("");End=M(null);ngOnInit(){this.getData(this.RegisterID(),this.Start(),this.End(),this.SessionID())}static \u0275fac=(()=>{let d;return function(n){return(d||(d=ye(t)))(n||t)}})();static \u0275cmp=N({type:t,selectors:[["POS-sales-return"]],inputs:{RegisterID:[1,"RegisterID"],SessionID:[1,"SessionID"],Start:[1,"Start"],End:[1,"End"]},features:[G],decls:37,vars:18,consts:[[1,"row","g-0"],[1,"col-sm-12"],[1,"card","border-top-0"],[1,"card-body"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end",2,"width","20px"],[1,"border-end"],[1,"text-end","border-end"],[1,"text-end"],["colspan","4"],[1,"text-end",3,"innerHTML"],[3,"innerHTML"],["target","_blank",3,"routerLink","queryParams"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),l(8,"No"),o(),i(9,"th",7),l(10,"Number"),o(),i(11,"th",7),l(12,"Date"),o(),i(13,"th",7),l(14,"Customer"),o(),i(15,"th",8),l(16,"Quantity"),o(),i(17,"th",8),l(18,"Price"),o(),i(19,"th",9),l(20,"Net Sales"),o()()(),i(21,"tbody"),k(22,Pn,15,21,"tr",null,H),o(),i(24,"tfoot")(25,"tr")(26,"td",10),l(27,"Total"),o(),f(28,"td",11),p(29,"sum"),p(30,"quantityFraction"),f(31,"td",11),p(32,"sum"),p(33,"amountFraction"),f(34,"td",11),p(35,"sum"),p(36,"amountFraction"),o()()()()()()()),e&2&&(a(22),B(n.responseData()),a(6),c("innerHTML",C(30,6,y(29,3,n.responseData(),"Quantity")),w),a(3),c("innerHTML",C(33,11,y(32,8,n.responseData(),"UnitPrice")),w),a(3),c("innerHTML",C(36,16,y(35,13,n.responseData(),"Sales")),w))},dependencies:[ne,q,de,U,De,Te,Bi],encapsulation:2})};var Fn=()=>["/menu//Debt/Debt/Join_Invoice/New_Join_Invoice/Info"],Vn=t=>({ID:t}),Rn=(t,d,e)=>({"text-success":t,"text-warning":d,"text-danger":e});function Nn(t,d){t&1&&(i(0,"th",8),l(1,"Date"),o())}function On(t,d){t&1&&(i(0,"th",8),l(1,"Date"),o())}function kn(t,d){if(t&1&&(f(0,"td",14),p(1,"date")),t&2){let e=m().$implicit;c("innerHTML",y(1,1,e.Created,"dd MMM yyyy"),w)}}function Bn(t,d){if(t&1&&(f(0,"td",14),p(1,"date")),t&2){let e=m().$implicit;c("innerHTML",y(1,1,e.Date,"dd MMM yyyy"),w)}}function Ln(t,d){if(t&1&&(i(0,"tr"),f(1,"td",12),i(2,"td")(3,"a",13),l(4),o()(),u(5,kn,2,4,"td",14),u(6,Bn,2,4,"td",14),f(7,"td",14),p(8,"date"),f(9,"td",12),p(10,"number"),f(11,"td",12),p(12,"amountFraction"),o()),t&2){let e=d.$implicit,n=d.$index,r=m(2);a(),c("innerHTML",n+1,w),a(2),c("routerLink",z(18,Fn))("queryParams",T(19,Vn,e.ID)),a(),b(e.Number),a(),_(r.SessionType()==0?5:-1),a(),_(r.SessionType()!=0?6:-1),a(),c("innerHTML",y(8,11,e.Created,"HH:mm"),w),a(2),c("innerHTML",C(10,14,e.Quantity),w),a(2),$(He(21,Rn,e.PaymentStateID==3,e.PaymentStateID==2,e.PaymentStateID==1)),c("innerHTML",C(12,16,e.SalesNTax),w)}}function An(t,d){if(t&1&&(k(0,Ln,13,25,"tr",null,H),p(2,"sortBy")),t&2){let e=m();B(Mt(2,0,e.responseData(),"asc","Number"))}}function Hn(t,d){t&1&&(i(0,"tr")(1,"td",15),f(2,"app-empty-state"),o()())}var Ne=class t extends Se{apiUrl="/api/shift/join-invoices";RegisterID=M("");SessionID=M(null);Start=M("");SessionType=M(null);End=M(null);ngOnInit(){this.getData(this.RegisterID(),this.Start(),this.End(),this.SessionID())}static \u0275fac=(()=>{let d;return function(n){return(d||(d=ye(t)))(n||t)}})();static \u0275cmp=N({type:t,selectors:[["POS-join-invoice"]],inputs:{RegisterID:[1,"RegisterID"],SessionID:[1,"SessionID"],Start:[1,"Start"],SessionType:[1,"SessionType"],End:[1,"End"]},features:[G],decls:22,vars:3,consts:[[1,"row","g-0"],[1,"col-12"],[1,"card","me-5","border-top-0"],[1,"card-body"],[1,"table","table-bordered"],[1,"thead-light"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end",2,"width","200px"],[1,"border-end",2,"width","85px"],[1,"border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","60px"],[1,"text-end",3,"innerHTML"],[1,"text-primary",3,"routerLink","queryParams"],[3,"innerHTML"],["colspan","6",1,"text-center"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),l(8,"No"),o(),i(9,"th",7),l(10,"Number"),o(),u(11,Nn,2,0,"th",8),u(12,On,2,0,"th",8),i(13,"th",9),l(14,"Time"),o(),i(15,"th",10),l(16,"Qty"),o(),i(17,"th",11),l(18,"Nett"),o()()(),i(19,"tbody"),u(20,An,3,4)(21,Hn,3,0,"tr"),o()()()()()()),e&2&&(a(11),_(n.SessionType()==0?11:-1),a(),_(n.SessionType()!=0?12:-1),a(8),_(n.responseData()&&n.responseData().length>0?20:21))},dependencies:[ne,de,q,rt,ie,U,Hi,Te],encapsulation:2})};var Wn=t=>[t],$n=t=>({ID:t}),jn=t=>({"text-danger":t});function zn(t,d){if(t&1&&f(0,"th",9),t&2){let e=d.$implicit;c("innerHTML",e.Name,w)}}function qn(t,d){if(t&1&&(i(0,"td",16),p(1,"FilterGetAmount"),l(2),p(3,"FilterGetAmount"),p(4,"amountFraction"),o()),t&2){let e=d.$implicit,n=m().$implicit;c("ngClass",T(14,jn,+di(1,2,n.Amounts,"Key",e.ID,"Value")<0)),a(2),x(" ",C(4,12,di(3,7,n.Amounts,"Key",e.ID,"Value"))," ")}}function Un(t,d){if(t&1&&(i(0,"tr"),f(1,"td",12),i(2,"td"),l(3),p(4,"date"),o(),i(5,"td"),l(6),p(7,"date"),o(),i(8,"td")(9,"a",13)(10,"div",14)(11,"span"),l(12),o()()()(),f(13,"td",15),k(14,qn,5,16,"td",16,H),o()),t&2){let e,n=d.$implicit,r=d.$index,s=m();a(),c("innerHTML",r+1,w),a(2),x(" ",y(4,7,n.Date,"dd MMM yyyy")," "),a(3),x(" ",y(7,10,n.PostedDate,"dd MMM yyyy")," "),a(3),c("routerLink",T(13,Wn,n.TypeID==1?"/menu/Orders/Orders/Customer_Invoice/Info":"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info"))("queryParams",T(15,$n,n.InvoiceID)),a(3),b(n.Number),a(),c("innerHTML",n.CustomerName,w),a(),B((e=s.responseData())==null?null:e.PaymentMethods)}}function Gn(t,d){if(t&1&&(i(0,"td",11),l(1),p(2,"GetChildrenArray"),p(3,"sum"),p(4,"amountFraction"),o()),t&2){let e,n=d.$implicit,r=m();a(),x(" ",C(4,7,y(3,4,r.filterAmount(y(2,1,(e=r.responseData())==null?null:e.PaymentReceived,"Amounts"),"Key",n.ID),"Value"))," ")}}var Oe=class t extends Se{apiUrl="/api/shift/payments-received";RegisterID=M("");SessionID=M(null);Start=M("");End=M(null);PaymentMethods=M([]);ngOnInit(){this.getData(this.RegisterID(),this.Start(),this.End(),this.SessionID())}filterAmount(d,e,n){return d.filter(function(r){return r[e]==n})}static \u0275fac=(()=>{let d;return function(n){return(d||(d=ye(t)))(n||t)}})();static \u0275cmp=N({type:t,selectors:[["POS-payment-receive"]],inputs:{RegisterID:[1,"RegisterID"],SessionID:[1,"SessionID"],Start:[1,"Start"],End:[1,"End"],PaymentMethods:[1,"PaymentMethods"]},features:[G],decls:30,vars:0,consts:[[1,"row","g-0"],[1,"col-sm-12"],[1,"card","me-5","border-top-0"],[1,"card-body"],[1,"table-responsive",2,"overflow-x","auto"],[1,"table","table-bordered"],[1,"thead-light"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end"],[1,"text-end","border-end",3,"innerHTML"],["colspan","5",1,"text-end"],[1,"text-end"],[1,"text-end",3,"innerHTML"],["target","_blank",3,"routerLink","queryParams"],[1,"d-flex","gap-2"],[3,"innerHTML"],[1,"text-end",3,"ngClass"]],template:function(e,n){if(e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"table",5)(6,"thead",6)(7,"tr")(8,"th",7),l(9,"No"),o(),i(10,"th",8),l(11,"Payment Date"),o(),i(12,"th",8),l(13,"Invoice Date"),o(),i(14,"th",8),l(15,"Number"),o(),i(16,"th",8),l(17,"Customer"),o(),k(18,zn,1,1,"th",9,H),o()(),i(20,"tbody"),k(21,Un,16,17,"tr",null,H),o(),i(23,"tfoot")(24,"tr")(25,"td",10)(26,"b"),l(27,"Total :"),o()(),k(28,Gn,5,9,"td",11,H),o()()()()()()()()),e&2){let r,s,g;a(18),B((r=n.responseData())==null?null:r.PaymentMethods),a(3),B((s=n.responseData())==null?null:s.PaymentReceived),a(7),B((g=n.responseData())==null?null:g.PaymentMethods)}},dependencies:[ne,ce,q,de,U,De,Ai,Wi,Te],encapsulation:2})};function Jn(t,d){if(t&1){let e=I();i(0,"th",6)(1,"button",10),v("click",function(){S(e);let r=m();return h(r.onShowExpenseModal())}),f(2,"i",11),o()()}}function Qn(t,d){if(t&1){let e=I();i(0,"td")(1,"i",13),v("click",function(){S(e);let r=m().$index,s=m();return h(s.onDeleteExpenses(r))}),o()()}}function Xn(t,d){if(t&1&&(i(0,"tr"),u(1,Qn,2,0,"td"),i(2,"td"),l(3),o(),i(4,"td",12),l(5),p(6,"amountFraction"),o(),i(7,"td",12),l(8),o(),i(9,"td"),l(10),o()()),t&2){let e=d.$implicit,n=m();a(),_(n.InputMode()&&n.isEditMode()?1:-1),a(2),b(e.Name),a(2),x(" ",C(6,5,e.Amount)," "),a(3),x(" ",e.PaymentName," "),a(2),b(e.Note)}}var ke=class t extends Se{apiUrl="/api/shift/expenses";Expenses=M([]);InputMode=M(null);Session=M(null);isEditMode=M(!0);showExpenseModal=si();deleteExpenses=si();items=Mi(()=>this.isEditMode()?this.Expenses()??[]:this.responseData()??[]);onDeleteExpenses(d){this.deleteExpenses.emit(d)}onShowExpenseModal(){this.showExpenseModal.emit()}ngOnInit(){let d=this.Session();this.isEditMode()||!d||this.getData(d.RegisterID,d.Start,d.End,d.ID)}static \u0275fac=(()=>{let d;return function(n){return(d||(d=ye(t)))(n||t)}})();static \u0275cmp=N({type:t,selectors:[["POS-expense"]],inputs:{Expenses:[1,"Expenses"],InputMode:[1,"InputMode"],Session:[1,"Session"],isEditMode:[1,"isEditMode"]},outputs:{showExpenseModal:"showExpenseModal",deleteExpenses:"deleteExpenses"},features:[G],decls:19,vars:1,consts:[[1,"row","g-0"],[1,"col-sm-12"],[1,"card","me-5"],[1,"card-body","py-5"],[1,"table","table-bordered","mb-6"],[1,"thead-light"],["width","15px",1,"border-end"],[1,"border-end",2,"width","150px"],[1,"border-end","text-end",2,"width","150px"],[1,"border-end"],["type","button","matTooltipPosition","above","matTooltip","Add Expense",1,"btn","btn-outline-dark","btn-sm","bg-white","text-black",3,"click"],["aria-hidden","true",1,"fa-solid","fa-plus"],[1,"text-end"],[1,"fa-solid","fa-xmark","fa-lg","text-danger",2,"cursor","pointer",3,"click"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr"),u(7,Jn,3,0,"th",6),i(8,"th",7),l(9,"Label"),o(),i(10,"th",8),l(11,"Amount"),o(),i(12,"th",9),l(13,"Payment"),o(),i(14,"th",9),l(15,"Note"),o()()(),i(16,"tbody"),k(17,Xn,11,7,"tr",null,H),o()()()()()()),e&2&&(a(7),_(n.InputMode()&&n.isEditMode()?7:-1),a(10),B(n.items()))},dependencies:[We,ue,Te],encapsulation:2})};var Kn=()=>["/print/shift-detail"],Zn=t=>({id:t}),ci=(t,d)=>({show:t,active:d}),on=(t,d)=>({"text-success":t,"text-danger":d}),Ut=t=>({active:t}),eo=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],to=t=>({ID:t}),io=t=>({"text-danger":t}),no=(t,d,e)=>({"text-success":t,"text-warning":d,"text-danger":e}),oo=()=>[];function ao(t,d){if(t&1&&(i(0,"a",1),f(1,"i",4),l(2," Print "),o()),t&2){let e=m();c("routerLink",z(2,Kn))("queryParams",T(3,Zn,e.idModel()))}}function ro(t,d){if(t&1){let e=I();i(0,"a",5),v("click",function(){S(e);let r=m();return h(r.showCloseModal())}),l(1," Close Register "),o()}}function lo(t,d){if(t&1&&f(0,"POS-shift-card-warning",7),t&2){let e,n,r,s,g,L=m(3);c("title",(e=L.cardShiftMessage())==null?null:e.title)("message",(n=L.cardShiftMessage())==null?null:n.message)("path",(r=L.cardShiftMessage())==null?null:r.path)("buttonText",(s=L.cardShiftMessage())==null?null:s.buttonText)("icon",(g=L.cardShiftMessage())==null?null:g.icon)}}function so(t,d){if(t&1&&u(0,lo,1,5,"POS-shift-card-warning",7),t&2){let e=m(2);_(e.cardShiftMessage()?0:-1)}}function mo(t,d){if(t&1&&(i(0,"small",14),p(1,"sum"),l(2),p(3,"sum"),p(4,"sum"),p(5,"amountFraction"),p(6,"sum"),p(7,"amountFraction"),o()),t&2){let e,n,r,s=m(3);c("matTooltip",((e=s.data().Rounding)==null?null:e.RoundingValue)!=="None"?((e=s.data().Rounding)==null?null:e.RoundingValue)+" Rounding with "+((e=s.data().Rounding)==null?null:e.RoundingMethod)+" Method Enabled":"")("ngClass",((n=s.data())==null?null:n.Session.Sales)+((n=s.data())==null?null:n.Session.Tax)+((n=s.data())==null?null:n.Session.Surcharge)-y(1,3,s.data().Payments,"Received")>0?"bg-gradient-success":"bg-gradient-danger"),a(2),x(" ",((r=s.data())==null?null:r.Session.Sales)+((r=s.data())==null?null:r.Session.Tax)+((r=s.data())==null?null:r.Session.Surcharge)-y(3,6,s.data().Payments,"Received")>0?"+"+C(5,12,((r=s.data())==null?null:r.Session.Sales)+((r=s.data())==null?null:r.Session.Tax)+((r=s.data())==null?null:r.Session.Surcharge)-y(4,9,s.data().Payments,"Received")):C(7,17,((r=s.data())==null?null:r.Session.Sales)+((r=s.data())==null?null:r.Session.Tax)+((r=s.data())==null?null:r.Session.Surcharge)-y(6,14,s.data().Payments,"Received"))," compared with sales ")}}function po(t,d){t&1&&(i(0,"th",51),l(1," Received "),o())}function co(t,d){t&1&&(i(0,"th",51),l(1," Expected "),o())}function uo(t,d){t&1&&(i(0,"th",52),l(1," Differences "),o())}function _o(t,d){if(t&1&&(i(0,"td",55),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;a(),x(" ",C(2,1,e.Received)," ")}}function fo(t,d){if(t&1&&(i(0,"td",55),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;a(),x(" ",C(2,1,e.Expected)," ")}}function Co(t,d){if(t&1&&(i(0,"td",59),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;$(Q(5,on,e.ShortOver>0,e.ShortOver<0)),a(),x(" ",C(2,3,e.ShortOver)," ")}}function xo(t,d){if(t&1){let e=I();i(0,"tr")(1,"td"),l(2),o(),i(3,"td")(4,"input",54),p(5,"amountFraction"),v("ngModelChange",function(r){let s=S(e).$implicit;return h(s.Start=r)})("keyup",function(){let r=S(e).$implicit,s=m(4);return h(s.myFunct(r))}),o()(),u(6,_o,3,3,"td",55),u(7,fo,3,3,"td",55),i(8,"td")(9,"input",56),v("keyup",function(){let r=S(e).$implicit,s=m(4);return h(s.ChangeDifferences(r,!0))}),V("ngModelChange",function(r){let s=S(e).$implicit;return F(s.Amount,r)||(s.Amount=r),h(r)}),o()(),u(10,Co,3,8,"td",57),i(11,"td")(12,"input",58),V("ngModelChange",function(r){let s=S(e).$implicit;return F(s.Note,r)||(s.Note=r),h(r)}),o()()()}if(t&2){let e=d.$implicit,n=m(4);a(2),b(e.Name),a(2),c("ngModel",C(5,10,e.Start))("readonly",!n.data().ExpectedPaymentVisible)("decimalPlaces",n.fraction.amount.maximumFraction),a(2),_(n.data().PaymentReceiveVisible?6:-1),a(),_(n.data().ExpectedPaymentVisible?7:-1),a(2),P("ngModel",e.Amount),c("decimalPlaces",n.fraction.amount.maximumFraction),a(),_(n.data().ExpectedPaymentVisible?10:-1),a(2),P("ngModel",e.Note)}}function go(t,d){if(t&1&&(i(0,"td",60),l(1),p(2,"sum"),p(3,"amountFraction"),o()),t&2){let e=m(5);a(),x(" ",C(3,4,y(2,1,e.data().Payments,"Received"))," ")}}function So(t,d){if(t&1&&(i(0,"td",60),l(1),p(2,"sum"),p(3,"amountFraction"),o()),t&2){let e=m(5);a(),x(" ",C(3,4,y(2,1,e.data().Payments,"Expected"))," ")}}function ho(t,d){if(t&1&&(i(0,"td",61),p(1,"sum"),p(2,"sum"),l(3),p(4,"sum"),p(5,"amountFraction"),o()),t&2){let e=m(5);$(Q(14,on,y(1,3,e.data().Payments,"ShortOver")>0,y(2,6,e.data().Payments,"ShortOver")<0)),a(3),x(" ",C(5,12,y(4,9,e.data().Payments,"ShortOver"))," ")}}function yo(t,d){if(t&1&&(i(0,"tfoot")(1,"tr")(2,"th"),l(3,"Total:"),o(),i(4,"td",60),l(5),p(6,"sum"),p(7,"amountFraction"),o(),u(8,go,4,6,"td",60),u(9,So,4,6,"td",60),i(10,"td",61),l(11),p(12,"sum"),p(13,"amountFraction"),o(),u(14,ho,6,17,"td",62),o()()),t&2){let e=m(4);a(5),x(" ",C(7,8,y(6,5,e.data().Payments,"Start"))," "),a(3),_(e.data().PaymentReceiveVisible?8:-1),a(),_(e.data().ExpectedPaymentVisible?9:-1),a(2),x(" ",C(13,13,y(12,10,e.data().Payments,"Amount"))," "),a(3),_(e.data().ExpectedPaymentVisible?14:-1)}}function vo(t,d){if(t&1&&(i(0,"table",18)(1,"thead",49)(2,"tr")(3,"th",50),l(4," Payment "),o(),i(5,"th",51),l(6," Start "),o(),u(7,po,2,0,"th",51),u(8,co,2,0,"th",51),i(9,"th",51),l(10," Counted "),o(),u(11,uo,2,0,"th",52),i(12,"th",53),l(13," Note "),o()()(),i(14,"tbody"),k(15,xo,13,12,"tr",null,H),o(),u(17,yo,15,15,"tfoot"),o()),t&2){let e=m(3);a(7),_(e.data().PaymentReceiveVisible?7:-1),a(),_(e.data().ExpectedPaymentVisible?8:-1),a(3),_(e.data().ExpectedPaymentVisible?11:-1),a(4),B(e.data().Payments),a(2),_(e.data().ExpectedPaymentVisible?17:-1)}}function bo(t,d){if(t&1&&(i(0,"li",21)(1,"a",63),l(2,"Invoice"),o()()),t&2){let e=m(3);a(),$(T(2,Ut,e.data().InvoiceVisible))}}function Eo(t,d){if(t&1){let e=I();i(0,"li",21)(1,"a",64),v("click",function(){S(e);let r=m(3);return h(r.onChangeTab("payment"))}),l(2," Payment "),o()()}if(t&2){let e=m(3);a(),$(T(2,Ut,!e.data().InvoiceVisible&&e.data().PaymentReceiveVisible))}}function Do(t,d){if(t&1){let e=I();i(0,"li",21)(1,"a",65),v("click",function(){S(e);let r=m(3);return h(r.onChangeTab("void"))}),l(2,"Voided Invoice"),o()()}if(t&2){let e=m(3);a(),$(T(2,Ut,!e.data().InvoiceVisible&&e.data().PaymentReceiveVisible))}}function Mo(t,d){if(t&1&&(i(0,"li",21)(1,"a",66),l(2,"Bank Note"),o()()),t&2){let e=m(3);a(),$(T(2,Ut,!e.data().InvoiceVisible&&!e.data().PaymentReceiveVisible))}}function Io(t,d){if(t&1&&(f(0,"td",75),p(1,"date")),t&2){let e=m().$implicit;c("innerHTML",y(1,1,e.Created,"dd MMM yyyy"),w)}}function To(t,d){if(t&1&&(f(0,"td",75),p(1,"date")),t&2){let e=m().$implicit;c("innerHTML",y(1,1,e.Date,"dd MMM yyyy"),w)}}function wo(t,d){if(t&1&&(i(0,"tr"),f(1,"td",76),i(2,"td"),f(3,"a",77),o(),u(4,Io,2,4,"td",75),u(5,To,2,4,"td",75),f(6,"td",75),p(7,"date"),f(8,"td",76),p(9,"amountFraction"),f(10,"td",75),o()),t&2){let e,n,r=d.$implicit,s=d.$index,g=m(4);a(),c("innerHTML",s+1,w),a(2),c("routerLink",z(18,eo))("queryParams",T(19,to,r.ID))("innerHTML",r.Number,w),a(),_(((e=g.data())==null?null:e.Session.Type)==0?4:-1),a(),_(((n=g.data())==null?null:n.Session.Type)!=0?5:-1),a(),c("innerHTML",y(7,13,r.Created,"HH:mm"),w),a(2),$(T(21,io,r.SalesNTax<0)),c("innerHTML",C(9,16,r.SalesNTax),w),a(2),$(He(23,no,r.PaymentStateID==3,r.PaymentStateID==2,r.PaymentStateID==1)),c("innerHTML",r.PaymentState,w)}}function Po(t,d){if(t&1&&(i(0,"div",29)(1,"div",67)(2,"div",15)(3,"table",18)(4,"thead",41)(5,"tr")(6,"th",68),l(7," No "),o(),i(8,"th",69),l(9," Number "),o(),i(10,"th",70),l(11," Date "),o(),i(12,"th",71),l(13," Time "),o(),i(14,"th",72),l(15,"Nett"),o(),i(16,"th",73),l(17,"Payment"),o()()(),i(18,"tbody"),k(19,wo,11,27,"tr",null,H),o(),i(21,"tfoot")(22,"tr"),f(23,"td",74),i(24,"td",55),f(25,"b",75),p(26,"sum"),p(27,"amountFraction"),o(),f(28,"td"),o()()()()()()),t&2){let e=m(3);a(19),B(e.data().Invoices),a(6),c("innerHTML",C(27,4,y(26,1,e.data().Invoices,"SalesNTax")),w)}}function Fo(t,d){if(t&1&&f(0,"POS-join-invoice",31),t&2){let e,n,r,s=m(3);c("RegisterID",(e=s.data())==null||e.Session==null?null:e.Session.RegisterID)("Start",(n=s.data())==null||n.Session==null?null:n.Session.Start)("SessionType",(r=s.data())==null||r.Session==null?null:r.Session.Type)}}function Vo(t,d){if(t&1&&f(0,"POS-voided-invoice",33),t&2){let e,n,r=m(3);c("RegisterID",(e=r.data())==null||e.Session==null?null:e.Session.RegisterID)("Start",(n=r.data())==null||n.Session==null?null:n.Session.Start)}}function Ro(t,d){if(t&1&&f(0,"POS-payment-receive",35),t&2){let e,n,r=m(3);c("RegisterID",(e=r.data())==null||e.Session==null?null:e.Session.RegisterID)("Start",(n=r.data())==null||n.Session==null?null:n.Session.Start)("PaymentMethods",r.data().PaymentMethods)}}function No(t,d){if(t&1){let e=I();i(0,"POS-expense",78),v("showExpenseModal",function(){S(e);let r=m(3);return h(r.showExpenseModal())})("deleteExpenses",function(r){S(e);let s=m(3);return h(s.DeleteExpenses(r))}),o()}if(t&2){let e,n=m(3);c("Expenses",n.data().Expenses??z(3,oo))("InputMode",n.data().InputMode)("Session",(e=n.data())==null?null:e.Session)}}function Oo(t,d){if(t&1){let e=I();i(0,"td")(1,"input",82),V("ngModelChange",function(r){S(e);let s=m().$implicit;return F(s.Quantity,r)||(s.Quantity=r),h(r)}),v("keyup",function(){S(e);let r=m().$implicit,s=m(3);return h(s.DenominationTotal(r))}),o()()}if(t&2){let e=m().$implicit,n=m(3);a(),P("ngModel",e.Quantity),c("decimalPlaces",n.fraction.amount.maximumFraction)}}function ko(t,d){if(t&1&&(i(0,"tr")(1,"td",79),l(2),o(),i(3,"td",80),l(4),p(5,"number"),o(),u(6,Oo,2,2,"td"),i(7,"td",81),l(8),p(9,"amountFraction"),o()()),t&2){let e,n,r=d.$implicit,s=m(3);a(2),x(" ",r.PriceDisplay," "),a(),c("hidden",((e=s.data())==null?null:e.Session)&&s.data().InputMode),a(),x(" ",C(5,5,r.Quantity)," "),a(2),_((n=s.data())!=null&&n.Session&&s.data().InputMode?6:-1),a(2),x(" ",C(9,7,r.Total)," ")}}function Bo(t,d){if(t&1&&f(0,"POS-sales-return",33),t&2){let e,n,r=m(3);c("RegisterID",(e=r.data())==null||e.Session==null?null:e.Session.RegisterID)("Start",(n=r.data())==null||n.Session==null?null:n.Session.Start)}}function Lo(t,d){if(t&1&&f(0,"POS-loyalty-point",33),t&2){let e,n,r=m(3);c("RegisterID",(e=r.data())==null||e.Session==null?null:e.Session.RegisterID)("Start",(n=r.data())==null||n.Session==null?null:n.Session.Start)}}function Ao(t,d){if(t&1){let e=I();i(0,"div"),f(1,"POS-shift-detail-card",8),i(2,"div",9)(3,"div",10)(4,"div",11)(5,"div",12)(6,"h2",13),l(7,"Payment Summary"),o(),u(8,mo,8,19,"small",14),p(9,"sum"),o(),i(10,"div",15)(11,"div",16)(12,"div",17),u(13,vo,18,4,"table",18),o()()()()()(),i(14,"div",9)(15,"div",19)(16,"ul",20),u(17,bo,3,4,"li",21),u(18,Eo,3,4,"li",21),i(19,"li",21)(20,"a",22),v("click",function(){S(e);let r=m(2);return h(r.onChangeTab("sales_return"))}),l(21,"Sales Return"),o()(),u(22,Do,3,4,"li",21),i(23,"li",21)(24,"a",23),v("click",function(){S(e);let r=m(2);return h(r.onChangeTab("loyalty"))}),l(25,"Loyalty Point"),o()(),i(26,"li",21)(27,"a",24),v("click",function(){S(e);let r=m(2);return h(r.onChangeTab("join_invoice"))}),l(28,"Join Invoice"),o()(),i(29,"li",21)(30,"a",25),v("click",function(){S(e);let r=m(2);return h(r.onChangeTab("expense"))}),l(31,"Expense"),o()(),u(32,Mo,3,4,"li",21),o(),i(33,"div",26)(34,"div",27)(35,"div",28),u(36,Po,29,6,"div",29),o()(),i(37,"div",30),u(38,Fo,1,3,"POS-join-invoice",31),o(),i(39,"div",32),u(40,Vo,1,2,"POS-voided-invoice",33),o(),i(41,"div",34),u(42,Ro,1,3,"POS-payment-receive",35),o(),i(43,"div",36),u(44,No,1,4,"POS-expense",37),o(),i(45,"div",38)(46,"div",28)(47,"div",19)(48,"div",39)(49,"div",15)(50,"table",40)(51,"thead",41)(52,"tr")(53,"th",42),l(54,"Cash Denomination"),o(),i(55,"th",43),l(56," Qty "),o(),i(57,"th",44),l(58," Total "),o()()(),i(59,"tbody"),k(60,ko,10,9,"tr",null,H),o(),i(62,"tfoot")(63,"tr")(64,"th",45),l(65,"Total:"),o(),i(66,"td",46),l(67),p(68,"sum"),p(69,"amountFraction"),o()()()()()()()()(),i(70,"div",47),u(71,Bo,1,2,"POS-sales-return",33),o(),i(72,"div",48),u(73,Lo,1,2,"POS-loyalty-point",33),o()()()()()}if(t&2){let e,n,r,s,g,L,W,se,xt,R=m(2);a(),c("Name",R.data().LoginID)("OutletName",R.data().OutletName)("RegisterName",R.data().Register.Name)("Start",R.data().RegisterStartWithTimezone)("End",R.data().RegisterEndWithTimezone)("Invoices",R.data().Invoices)("VoidInvoice",R.data().VoidInvoice)("Sales",(e=R.data())==null?null:e.Session.Sales)("Surcharge",(n=R.data())==null?null:n.Session.Surcharge)("Tax",(r=R.data())==null?null:r.Session.Tax)("StartDate",R.data().RegisterStartWithTimezone)("EndDate",R.data().RegisterEndWithTimezone)("CurrencySymbol",(s=R.data())==null?null:s.Session.PrimaryCurrencySymbol)("totalSalesVisible",R.totalSalesVisible()),a(7),_(((g=R.data())==null?null:g.Session.Sales)+((g=R.data())==null?null:g.Session.Tax)+((g=R.data())==null?null:g.Session.Surcharge)-y(9,34,R.data().Payments,"Received")!==0?8:-1),a(5),_(R.data().Payments.length>0?13:-1),a(4),_(((L=R.data())==null?null:L.Session)!=null&&R.data().InvoiceVisible?17:-1),a(),_(((W=R.data())==null?null:W.Session)!=null&&R.data().PaymentReceiveVisible?18:-1),a(4),_(R.data().InvoiceVisible?22:-1),a(10),_((se=R.data())!=null&&se.Session?32:-1),a(2),$(Q(42,ci,R.data().InvoiceVisible,R.data().InvoiceVisible)),a(2),_(((xt=R.data())==null?null:xt.Session)!=null?36:-1),a(2),_(R.isTabOpened("join_invoice")?38:-1),a(2),_(R.data().InvoiceVisible&&R.isTabOpened("void")?40:-1),a(),$(Q(45,ci,!R.data().InvoiceVisible&&R.data().PaymentReceiveVisible,!R.data().InvoiceVisible&&R.data().PaymentReceiveVisible)),a(),_(R.data().PaymentReceiveVisible&&R.isTabOpened("payment")?42:-1),a(2),_(R.isTabOpened("expense")?44:-1),a(),$(Q(48,ci,!R.data().InvoiceVisible&&!R.data().PaymentReceiveVisible,!R.data().InvoiceVisible&&!R.data().PaymentReceiveVisible)),a(15),B(R.data().Denominations),a(7),x(" ",C(69,40,y(68,37,R.data().Denominations,"Total"))," "),a(4),_(R.isTabOpened("sales_return")?71:-1),a(2),_(R.isTabOpened("loyalty")?73:-1)}}function Ho(t,d){if(t&1&&(i(0,"div",6),u(1,so,1,1)(2,Ao,74,51,"div"),o()),t&2){let e,n,r=m();Dt("background-color",!r.data().ClosureEnabled||!((e=r.data())!=null&&e.Session)?"white":"#F1F2F4"),a(),_(!r.data().ClosureEnabled||!((n=r.data())!=null&&n.Session)?1:2)}}var qt=class t extends Ji{constructor(e,n,r,s,g,L){super(e,n,"shift/load-my-shift",g);this.httpService=n;this.matDialog=r;this.localData=s;this.activatedRoute=g;this.toastr=L}httpService;matDialog;localData;activatedRoute;toastr;config=E(null);Filter=E({});PrintUrl=E(null);Notes=E(null);Visitors=E(null);InputMode=E(!1);MessageInfo=E(null);idModel=E(null);fraction=j(Ti);totalSalesVisible=E(!0);activeTab=E("invoice");openedTabs=E(new Set(["invoice"]));cardShiftMessage=E(null);postBindForm(e){if(this.InputMode.set(!!e.InputMode),this.data().Session!=null){let n=this.data().Session.RegisterID,r=localStorage.getItem(n);if(r!=null){let s=(JSON.parse(r)??[]).filter(g=>!!g&&typeof g=="object");localStorage.setItem(n,JSON.stringify(s)),this.data.update(g=>A(O({},g),{Expenses:s}))}}this.totalSalesVisible.set(e.TotalSalesVisible),this.initCardShiftMessage(e)}initCardShiftMessage(e){let n={title:"",message:"",buttonText:"",icon:"",path:[]};e.ClosureEnabled?e.Message&&!e.Session&&(n={title:e.Message,message:"Go to Sell to Start a Shift",buttonText:"Start Shift",icon:"fa-solid fa-cash-register fa-xl",path:["/menu/Sell"]}):n={title:"Shift Feature is Disabled",message:"Go to Setup (Shift Module Configuration) to Enable the Feature.",buttonText:"Enable Shift",icon:"fa-solid fa-cog fa-xl",path:["/menu/Settings/Module/Shift"]},this.cardShiftMessage.set(n)}showCloseModal(){this.data().isExceedMaximumDays?this.openDialogExceedMaximumDays():this.openDialogCloseShift()}openDialogCloseShift(){this.matDialog.open(Ht,{data:{VisitorMandatory:this.data().VisitorMandatory}}).afterClosed().subscribe(n=>{n&&(this.Visitors.set(n.Data.Visitors),this.Notes.set(n.Data.Note),this.Visitors()===void 0&&this.Visitors.set(0),this.CloseRegister())})}openDialogExceedMaximumDays(){let e=this.data().RegisterStartWithTimezone,n=new Date(e||new Date),r=this.data().MaximumDaysRange;this.matDialog.open(st,{data:{maximumDaysRange:r,openDate:n}})}CloseRegister(){let e={RegisterID:this.data().Register.ID,Expenses:this.data().Expenses??[],Payments:this.data().Payments,Denominations:this.data().Denominations,Session:A(O({},this.data().Session),{Note:this.Notes(),Visitors:this.Visitors()})};this.httpService.post("/api/shift/close-my-shift",e).subscribe(n=>{this.InputMode.set(!1),this.idModel.set(n.Model.ID),this.PrintUrl.set(n.PrintUrl),this.MessageInfo.set(n.Message),this.toastr.success(n.Message,"Shift Closed"),localStorage.removeItem(this.data().Session.RegisterID),this.InputMode.set(!1)})}myFunct=function(e){e.Expected=e.Received+e.Start,this.ChangeDifferences(e)};DeleteExpenses=e=>{let n=this.data().Session.RegisterID,r=JSON.parse(localStorage.getItem(n)??"[]");r.splice(e,1),localStorage.setItem(n,JSON.stringify(r)),this.data.update(s=>A(O({},s),{Expenses:(s.Expenses??[]).filter((g,L)=>L!==e)}))};showExpenseModal(){this.matDialog.open($t,{data:{Form:new yt,expenseList:this.data().Expenses,LabelExpense:this.data().LabelExpense,PaymentList:this.data().PaymentList,ID:this.data().Session.RegisterID}}).afterClosed().pipe(Ae(n=>ee.IsNotEmpty(n?.Data))).subscribe(n=>{if(n.Data.RegisterSessionID=this.data().Session.RegisterID,localStorage.getItem(this.data().Session.RegisterID)==null)localStorage.setItem(this.data().Session.RegisterID,JSON.stringify([n.Data]));else{let r=JSON.parse(localStorage.getItem(this.data().Session.RegisterID));r.push(n.Data),localStorage.setItem(this.data().Session.RegisterID,JSON.stringify(r))}this.data.update(r=>A(O({},r),{Expenses:[...r.Expenses??[],n.Data]}))})}DenominationTotal=function(e){e.Total=e.Amount*e.Quantity};ChangeDifferences=function(e,n){this.data().ExpectedPaymentVisible&&(n||(e.Amount=e.Received+e.Start*1),e.ShortOver=e.Amount-(e.Received+e.Start*1))};filterAmount(e,n,r){return e.filter(function(s){return s[n]==r})}onChangeTab(e){let n=this.openedTabs();if(!n.has(e)){let r=new Set(n);r.add(e),this.openedTabs.set(r)}this.activeTab.set(e)}isTabOpened(e){return this.openedTabs().has(e)}static \u0275fac=function(n){return new(n||t)(D(Ce),D(te),D(_e),D(ot),D(nt),D(X))};static \u0275cmp=N({type:t,selectors:[["POS-shift"]],standalone:!1,features:[G],decls:6,vars:6,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","target","_blank",1,"btn","btn-outline-secondary","me-3",3,"routerLink","queryParams"],["data-cy","CloseRegister","role","button","matTooltipPosition","above","matTooltip","Close Register",1,"btn","btn-primary","text-white","me-3"],[1,"container-fluid","pt-4",3,"background-color"],[1,"fa-solid","fa-print"],["data-cy","CloseRegister","role","button","matTooltipPosition","above","matTooltip","Close Register",1,"btn","btn-primary","text-white","me-3",3,"click"],[1,"container-fluid","pt-4"],[3,"title","message","path","buttonText","icon"],[3,"Name","OutletName","RegisterName","Start","End","Invoices","VoidInvoice","Sales","Surcharge","Tax","StartDate","EndDate","CurrencySymbol","totalSalesVisible"],[1,"row"],[1,"col-12"],[1,"card","w-100"],[1,"card-header","d-flex","align-items-end"],[1,"mb-0","me-2"],["matTooltipPosition","above",1,"text-body-secondary","fw-semibold","px-3","rounded","align-self-end",2,"border-radius","50rem",3,"matTooltip","ngClass"],[1,"card-body"],[1,"col-12",2,"padding-left","0px","padding-right","0px"],[1,"table-responsive"],[1,"table","table-bordered"],[1,"col-sm-12"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","return-tab","data-bs-toggle","tab","href","#return","role","tab","aria-controls","return","aria-selected","false",1,"nav-link",3,"click"],["id","loyalty-tab","data-bs-toggle","tab","href","#loyalty","role","tab","aria-controls","loyalty","aria-selected","false",1,"nav-link",3,"click"],["id","invoice-tab","data-bs-toggle","tab","href","#joinInvoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link",3,"click"],["id","expense-tab","data-bs-toggle","tab","href","#expense","role","tab","aria-controls","expense","aria-selected","false",1,"nav-link",3,"click"],["id","myTabContent",1,"tab-content"],["id","invoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"row","g-0"],[1,"col"],["id","joinInvoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"RegisterID","Start","SessionType"],["id","void","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"RegisterID","Start"],["id","payment","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"RegisterID","Start","PaymentMethods"],["id","expense","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"Expenses","InputMode","Session"],["id","bank","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"card","border-top-0"],[1,"table","table-bordered","custom-table"],[1,"thead-light"],[1,"border-end"],[1,"border-end","text-end",2,"width","100px"],[1,"text-end","pe-8",2,"width","240px"],["colspan","2",1,"text-end"],[1,"text-end","pe-8","fw-bold"],["id","return","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["id","loyalty","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"table-light"],[1,"border-end",2,"width","150px"],[1,"border-end","text-end","pe-10",2,"width","150px"],[1,"text-end","pe-10",2,"width","125px"],[1,"border-start","text-end","pe-10"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModelChange","keyup","ngModel","readonly","decimalPlaces"],[1,"text-end"],["type","text","autoNum","",1,"form-control","text-end",3,"keyup","ngModelChange","ngModel","decimalPlaces"],[1,"text-end","pe-10",3,"class"],["type","text",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-end","pe-10"],[1,"text-end","fw-bold"],[1,"text-end","pe-10","fw-bold"],[1,"text-end","pe-10","fw-bold",3,"class"],["id","invoice-tab","data-bs-toggle","tab","href","#invoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link"],["id","payment-tab","data-bs-toggle","tab","href","#payment","role","tab","aria-controls","payment","aria-selected","true",1,"nav-link",3,"click"],["expe","","id","void-tab","data-bs-toggle","tab","href","#void","role","tab","aria-controls","void","aria-selected","false",1,"nav-link",3,"click"],["id","bank-tab","data-bs-toggle","tab","href","#bank","role","tab","aria-controls","bank","aria-selected","false",1,"nav-link"],[1,"card","me-5","border-top-0"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end",2,"width","200px"],[1,"border-end",2,"width","85px"],[1,"border-end",2,"width","30px"],[1,"text-end","border-end"],[2,"width","60px"],["colspan","4"],[3,"innerHTML"],[1,"text-end",3,"innerHTML"],[1,"text-primary",3,"routerLink","queryParams","innerHTML"],[3,"showExpenseModal","deleteExpenses","Expenses","InputMode","Session"],[1,"fw-bold"],[1,"text-end",3,"hidden"],[1,"text-end","pe-8"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModelChange","keyup","ngModel","decimalPlaces"]],template:function(n,r){if(n&1&&(i(0,"mainpanel-cmp",0)(1,"actions"),u(2,ao,3,5,"a",1),u(3,ro,2,0,"a",2),o(),i(4,"content"),u(5,Ho,3,3,"div",3),o()()),n&2){let s;c("pageData",r.menuData())("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),_(!r.InputMode()&&r.PrintUrl()?2:-1),a(),_((s=r.data())!=null&&s.Session&&r.InputMode()&&r.data().ClosureEnabled?3:-1),a(2),_(r.data()?5:-1)}},dependencies:[xe,ce,q,ae,Y,K,le,ue,Me,pt,Fe,Ve,Re,Ne,Oe,ke,ie,U,De,pe],styles:["@media(max-width:999px){.shift-info[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{height:130px}.shift-info[_ngcontent-%COMP%]{margin-bottom:12px}}.card-warning-wrapper[_ngcontent-%COMP%]{width:100%;flex-grow:1;background-color:#fff;height:500px}.custom-card[_ngcontent-%COMP%]{position:relative;width:40%;height:300px;background:#fff;border-radius:30px;box-shadow:0 4px 12px #00000014;border-top:8px solid #87cb16;padding-left:20px;padding-right:20px}"],changeDetection:0})};var Wo=t=>({"bg-light-gray":t}),$o=()=>["/menu/Sell/Offline_Cache/Orders"],jo=()=>["/menu/Settings/Module/Shift"];function zo(t,d){if(t&1&&(i(0,"a",3)(1,"b"),l(2),o()()),t&2){let e=m(2);c("routerLink",z(2,$o)),a(2),x("You have ",e.totalOfflineOrders()," Offline Orders")}}function qo(t,d){t&1&&f(0,"POS-shift-card-warning",4),t&2&&c("path",z(1,jo))}function Uo(t,d){if(t&1&&(i(0,"div",5),l(1),o()),t&2){let e=m(2);a(),x(" ",e.data().Warning," ")}}function Go(t,d){t&1&&(i(0,"td"),l(1,"VACANT"),o())}function Jo(t,d){t&1&&(i(0,"td",10),l(1,"Active"),o())}function Qo(t,d){if(t&1&&(i(0,"span"),l(1),o()),t&2){let e=m().$implicit;a(),x(" (",e.Day," days ago) ")}}function Xo(t,d){if(t&1){let e=I();i(0,"button",13),v("click",function(){S(e);let r=m(2).$implicit,s=m(3);return h(s.CloseShift(r))}),l(1," End Shift "),o()}}function Yo(t,d){if(t&1&&(i(0,"td",11),u(1,Xo,2,0,"button",12),o()),t&2){let e=m(4);a(),_(e.roleService.sell.Edit?1:-1)}}function Ko(t,d){t&1&&f(0,"td")}function Zo(t,d){if(t&1&&(i(0,"tr")(1,"td"),l(2),o(),u(3,Go,2,0,"td"),u(4,Jo,2,0,"td",10),i(5,"td"),l(6),o(),i(7,"td"),l(8),p(9,"date"),o(),i(10,"td"),l(11),p(12,"date"),u(13,Qo,2,1,"span"),o(),u(14,Yo,2,1,"td",11),u(15,Ko,1,0,"td"),o()),t&2){let e=d.$implicit;a(2),b(e.Name),a(),_(e.State=="Close"?3:-1),a(),_(e.State!="Close"?4:-1),a(2),b(e.State!="Close"?e.LoginID:"-"),a(2),x(" ",e.State!="Close"?y(9,9,e.Start,"dd MMM yyyy"):"-"," "),a(3),x(" ",e.State!="Close"?y(12,12,e.Start,"HH:mm")+" - Now":"-"," "),a(2),_(e.Day>0?13:-1),a(),_(e.State!="Close"?14:-1),a(),_(e.State=="Close"?15:-1)}}function ea(t,d){if(t&1&&(i(0,"div")(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr")(5,"th"),l(6,"Outlet"),o(),i(7,"th"),l(8,"Status"),o(),i(9,"th"),l(10,"Cashier"),o(),i(11,"th"),l(12,"Open"),o(),i(13,"th"),l(14,"Time"),o(),i(15,"th",9),l(16,"Action"),o()()(),i(17,"tbody"),k(18,Zo,16,15,"tr",null,H),o()()()()),t&2){let e=m(2);a(18),B(e.data().AccessibleRegisters)}}function ta(t,d){if(t&1&&(i(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"h3",2),u(4,zo,3,3,"a",3),o(),u(5,qo,1,2,"POS-shift-card-warning",4),u(6,Uo,2,1,"div",5),u(7,ea,20,0,"div"),o()()()),t&2){let e=m();c("pageData",e.menuData())("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),c("ngClass",T(8,Wo,!e.data().AccessibleRegisters||e.data().Session)),a(2),_(e.totalOfflineOrders()>0?4:-1),a(),_(e.data().ClosureEnabled?-1:5),a(),_(e.data().Warning!=null||e.data().Warning!=null?6:-1),a(),_(e.data().ClosureEnabled?7:-1)}}var Gt=class t extends $e{constructor(e,n,r){super(e,n,"Shift/ShiftList",null,r);this.httpService=n;this.destroy$=new Be}httpService;dialog=j(_e);roleService=j(Ie);localData=j(ot);toastr=j(X);config;totalOfflineOrders=this.localData.totalOfflineOrders;destroy$;CloseShift(e){if(!confirm("Are you sure you want to End Shift?"))return;let n={RegisterID:e.ID,CashierID:e.CashierID};this.httpService.post("/api/shift/load-my-shift",n).pipe(Je(this.destroy$),Ae(r=>{let s=r.isExceedMaximumDays;return s&&this.openDialogExceedMaximumDays(r.MaximumDaysRange,r.RegisterStartWithTimezone),s==!1}),me(r=>({RegisterID:r.Register.ID,Note:"",Expenses:r.Expenses,Payments:r.Payments,Denominations:r.Denominations,Session:r.Session,Visitors:0})),Ge(r=>this.EndShift(r))).subscribe({next:r=>{this.toastr.success(r.Message,oe.Success),localStorage.removeItem(r.Model.RegisterID),this.getListData()}})}openDialogExceedMaximumDays(e,n){let r=new Date(n||new Date);this.dialog.open(st,{data:{maximumDaysRange:e,openDate:r}})}EndShift(e){return this.httpService.post("/api/shift/close-my-shift",e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(n){return new(n||t)(D(Ce),D(te),D(X))};static \u0275cmp=N({type:t,selectors:[["POS-active-shift"]],standalone:!1,features:[G],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],["id","ActiveShift",1,"container-fluid","mt-3",3,"ngClass"],[1,"fw-bold"],["target","_blank",3,"routerLink"],["title","Shift Feature is Disabled","message","Go to Setup (Shift Module Configuration) to Enable the Feature.","buttonText","Enable Shift","icon","fa-solid fa-cog fa-xl",3,"path"],["role","alert",1,"alert","alert-warning"],[1,"clearfix","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","110px"],[1,"text-success"],[1,"text-center"],[1,"btn","btn-outline-danger"],[1,"btn","btn-outline-danger",3,"click"]],template:function(n,r){n&1&&u(0,ta,8,10,"mainpanel-cmp",0),n&2&&_(r.data()?0:-1)},dependencies:[xe,ce,q,pt,U],encapsulation:2,changeDetection:0})};function ia(t,d){if(t&1){let e=I();i(0,"div",9),l(1," Columns "),o(),i(2,"div",10)(3,"ng-select",11),V("ngModelChange",function(r){S(e);let s=m();return F(s.exportType,r)||(s.exportType=r),h(r)}),v("ngModelChange",function(r){S(e);let s=m();return h(s.onSelectColumns(r))}),o()()}if(t&2){let e=m();a(3),c("items",e.exportTypes()),P("ngModel",e.exportType)}}function na(t,d){if(t&1){let e=I();i(0,"div",9),l(1," Shift "),o(),i(2,"div",4)(3,"p-multiselect",12),V("ngModelChange",function(r){S(e);let s=m();return F(s.selectedIds,r)||(s.selectedIds=r),h(r)}),o()()}if(t&2){let e=m();a(3),c("options",e.selectedData()),P("ngModel",e.selectedIds),c("maxSelectedLabels",3)("showClear",!0)("filter",!0)("resetFilterOnHide",!0)}}function oa(t,d){t&1&&(i(0,"mat-button-toggle",6),f(1,"i",13),l(2,"CSV"),o())}function aa(t,d){if(t&1){let e=I();i(0,"i",21),v("click",function(){S(e);let r=m(3);return h(r.onGetAllDataLength())}),o()}}function ra(t,d){if(t&1&&(i(0,"span"),l(1,"of "),u(2,aa,1,0,"i",19),p(3,"async"),i(4,"span",20),l(5),p(6,"async"),o(),l(7," page(s)"),o()),t&2){let e=m(2);a(2),_(C(3,2,e.allDataLength$)?-1:2),a(3),b(C(6,4,e.allDataLength$))}}function la(t,d){if(t&1){let e=I();i(0,"div",3),l(1," Page "),o(),i(2,"div",14)(3,"input",15),v("ngModelChange",function(r){S(e);let s=m();return h(s.pageNumber.set(r))}),o(),u(4,ra,8,6,"span"),o(),i(5,"div",16)(6,"div",17),f(7,"i",18),l(8),p(9,"number"),p(10,"number"),o()()}if(t&2){let e=m();a(3),c("ngModel",e.pageNumber()),a(),_(e.getAllDataLengthAPI()?4:-1),a(4),he(" Exporting data from ",C(9,4,e.displayedMinRangeRow)," - ",C(10,6,e.displayedMaxRangeRow)," ")}}var ft=class t{constructor(d,e,n,r){this.dialogRef=e;this.exportHandler=r;this.config.update(s=>A(O({},s),{title:`Export ${d.title}`,hideCancel:!0,customWidth:"450px"})),this.exportTypes.set(d.exportTypes),this.exportType.set(d.exportTypes[0].ID),this.filterExport.set(d.filterExport),this.pagination.set(d.pagination),this.getAllDataLengthAPI.set(d.getAllDataLengthAPI),this.allDataLength$=this.onGetAllDataLength$.pipe(Et(()=>n.post("/API/"+d.getAllDataLengthAPI,this.filterExport)),me(s=>typeof s=="number"?s:s.Count),Le(s=>{s<this.displayedMaxRangeRow&&this.setMinMaxRangeDisplayedRow(s)}),me(s=>Math.floor(s/this.pageSize())+(s%this.pageSize()>0?1:0)),gt(1),Ke(1)),this.selectedData.set(d.selectedData)}dialogRef;exportHandler;pageNumber=E(1);pageSize=E(1e4);config=E(new ve);exportTypes=E([]);exportType=E("");exportFormat=E("CSV");exportFormats=[{ID:"CSV"},{ID:"XLSX"}];_onGetAllDataLength=new Be;onGetAllDataLength$=this._onGetAllDataLength.asObservable();allDataLength$;filterExport=E({});displayedMaxRangeRow=this.pageSize();displayedMinRangeRow=this.pageNumber();pagination=E(!1);getAllDataLengthAPI=E("");isDetail=E(!1);selectedData=E([]);selectedIds=E([]);onOk(){this.isDetail()?this.exportHandler.exportCSVIds("ShiftExport/ExportPreviousShift",this.selectedIds()):(this.filterExport.update(d=>A(O({},d),{Export:!0})),this.pagination()&&this.filterExport.update(d=>A(O({},d),{ExportPageNumber:this.pageNumber(),ExportRowCount:this.pageSize()})),this.exportFormat()=="CSV"?this.exportHandler.exportCSV(this.exportType(),this.filterExport()):this.exportFormat()=="XLSX"&&this.exportHandler.exportXlsx(this.exportType(),this.filterExport())),this.dialogRef.close()}onGetAllDataLength(){this._onGetAllDataLength.next()}onChangePageNumber(){this.setDisplayedMinMaxRangeRow()}setMinMaxRangeDisplayedRow(d){for(;this.displayedMaxRangeRow>d&&this.pageNumber()>1;)this.pageNumber.update(e=>e-1),this.setDisplayedMinMaxRangeRow();this.displayedMaxRangeRow=d}setDisplayedMinMaxRangeRow(){this.displayedMinRangeRow=this.pageNumber()*this.pageSize()-this.pageSize()+1,this.displayedMaxRangeRow=this.pageNumber()*this.pageSize()}onSelectColumns(d){d=="ShiftExport/ExportPreviousShift"?(this.isDetail.set(!0),this.exportFormat.set("XLSX"),this.config.update(e=>A(O({},e),{customWidth:"600px"}))):this.isDetail.set(!1)}static \u0275fac=function(e){return new(e||t)(D(Ee),D(be),D(te),D(je))};static \u0275cmp=N({type:t,selectors:[["POS-modal-export-shift-detail"]],standalone:!1,decls:15,vars:6,consts:[[3,"onCancel","onClose","onOk","config"],[1,"container-fluid"],[1,"row"],[1,"col-3","fw-bold","mt-8",2,"display","flex","align-items","center"],[1,"col-9","mt-8"],[3,"ngModelChange","ngModel"],["value","CSV"],["value","XLSX"],[1,"fa-solid","fa-file-excel","me-3","mb-1"],[1,"col-3","fw-bold",2,"display","flex","align-items","center"],[1,"col-9"],["appendTo","body","bindLabel","Value","bindValue","ID",3,"ngModelChange","items","ngModel"],["appendTo","body","optionLabel","Label","optionValue","Value","placeholder","Select 1 or more shift detail","display","chip","filterBy","Label","filterMatchMode","contains","filterPlaceHolder","Search shift detail","panelStyleClass","shift-multiselect-panel",1,"w-100",3,"ngModelChange","options","ngModel","maxSelectedLabels","showClear","filter","resetFilterOnHide"],[1,"fa-solid","fa-file-csv","me-3","mb-1"],[1,"col-9","mt-8",2,"display","flex","align-items","center","column-gap","10px"],["type","text","autoNum","","name","pageNumber","id","pageNumber",1,"form-control","text-center",2,"width","50px",3,"ngModelChange","ngModel"],[1,"col-12","mt-8"],[1,"p-3",2,"background-color","#add8e6","border-radius","4px"],[1,"fa-solid","fa-circle-exclamation","mx-3"],[1,"fa-solid","fa-circle-question","mx-3"],[1,"fw-bold"],[1,"fa-solid","fa-circle-question","mx-3",3,"click"]],template:function(e,n){e&1&&(i(0,"modal-material",0),v("onCancel",function(){return n.dialogRef.close()})("onClose",function(){return n.dialogRef.close()})("onOk",function(){return n.onOk()}),i(1,"content")(2,"div",1)(3,"div",2),u(4,ia,4,2),u(5,na,4,6),i(6,"div",3),l(7," Format "),o(),i(8,"div",4)(9,"mat-button-toggle-group",5),V("ngModelChange",function(s){return F(n.exportFormat,s)||(n.exportFormat=s),s}),u(10,oa,3,0,"mat-button-toggle",6),i(11,"mat-button-toggle",7),f(12,"i",8),l(13,"XLSX"),o()()(),u(14,la,11,8),o()()()()),e&2&&(c("config",n.config()),a(4),_(n.exportTypes()&&n.exportTypes().length>1?4:-1),a(),_(n.isDetail()?5:-1),a(4),P("ngModel",n.exportFormat),a(),_(n.isDetail()?-1:10),a(4),_(n.pagination()&&!n.isDetail()?14:-1))},dependencies:[ae,Y,K,re,fe,le,zi,Fi,Vi,It,ie],styles:[`html.cdk-global-scrollblock .p-overlay:has(.shift-multiselect-panel){position:fixed!important}
2
+ `],encapsulation:2,changeDetection:0})};var Ct=(()=>{class t{constructor(){this.height=M("400px"),this.roleMessage=M()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["unauthorized-page"]],inputs:{height:[1,"height"],roleMessage:[1,"roleMessage"]},decls:11,vars:3,consts:[[1,"d-flex","align-items-center","justify-content-center","mt-8"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","160px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(n,r){n&1&&(St(0,"div",0)(1,"div",1)(2,"div"),vi(3,"img",2),ht(),St(4,"h1",3),l(5,"You are not authorized"),ht(),St(6,"p"),l(7," This page requires role "),St(8,"span",4),l(9),ht(),l(10," to be accessed. Please contact your Administrator to gain access! "),ht()()()),n&2&&(Dt("height",r.height()),a(9),x("[",r.roleMessage(),"]"))},encapsulation:2})}}return t})();var da=()=>["Register_Shift_Form"],sa=()=>["/menu/Shift/Main/Previous_Shift/Register_Shift_Detail"],ma=t=>({ID:t}),pa=()=>["/print/shift-detail"],ca=t=>({id:t});function ua(t,d){if(t&1){let e=I();i(0,"button",8),v("click",function(){S(e);let r=m(3);return h(r.openExportModal())}),f(1,"i",9),l(2," Export "),o()}}function _a(t,d){if(t&1){let e=I();i(0,"a",8),v("click",function(){S(e);let r=m(3);return h(r.httpPostListID("Shift/VoidClosureHistory","Are you sure you want to void selected record?"))}),f(1,"i",10),l(2,"Void "),o()}}function fa(t,d){t&1&&(i(0,"a",7),l(1,"Add"),o()),t&2&&c("routerLink",z(1,da))}function Ca(t,d){if(t&1&&(i(0,"actions"),u(1,ua,3,0,"button",6),u(2,_a,3,0,"a",6),u(3,fa,2,2,"a",7),o()),t&2){let e=m(2);a(),_(e.roleService.global.Export?1:-1),a(),_(e.getSelectedData().length>0?2:-1),a(),_(e.roleService.shift.Create?3:-1)}}function xa(t,d){if(t&1){let e=I();i(0,"div",11)(1,"h6"),l(2,"Outlet"),o(),i(3,"ng-select",12),V("ngModelChange",function(r){S(e);let s=m(2);return F(s.pageData().Filter.EntityID,r)||(s.pageData().Filter.EntityID=r),h(r)}),o(),i(4,"h6"),l(5,"From - To"),o(),i(6,"datepicker",13),V("dateChange",function(r){S(e);let s=m(2);return F(s.pageData().Filter.From,r)||(s.pageData().Filter.From=r),h(r)}),o(),i(7,"div",14)(8,"datepicker",15),V("dateChange",function(r){S(e);let s=m(2);return F(s.pageData().Filter.To,r)||(s.pageData().Filter.To=r),h(r)}),o()(),i(9,"h6"),l(10,"Sort By"),o(),i(11,"radio-options",16),V("modelChange",function(r){S(e);let s=m(2);return F(s.pageData().Filter.SortByEnd,r)||(s.pageData().Filter.SortByEnd=r),h(r)}),o()()}if(t&2){let e,n=m(2);a(3),c("items",(e=n.pageData().Options)==null?null:e.Entities),P("ngModel",n.pageData().Filter.EntityID),a(3),c("isFloatingLabel",!1),P("date",n.pageData().Filter.From),a(2),c("isFloatingLabel",!1),P("date",n.pageData().Filter.To),a(3),P("model",n.pageData().Filter.SortByEnd),c("options",n.pageData().Options.SortOption)}}function ga(t,d){if(t&1){let e=I();i(0,"th",20)(1,"input",29),v("change",function(r){S(e);let s=m(3);return h(s.onSelectAllData(r.target.checked))}),o()()}}function Sa(t,d){if(t&1){let e=I();i(0,"td",20)(1,"input",33),V("ngModelChange",function(r){S(e);let s=m().$implicit;return F(s.selected,r)||(s.selected=r),h(r)}),o()()}if(t&2){let e=m().$implicit;a(),P("ngModel",e.selected)}}function ha(t,d){if(t&1&&(i(0,"tr",26),u(1,Sa,2,1,"td",20),i(2,"td")(3,"a"),l(4),o()(),i(5,"td")(6,"a",30),l(7),o()(),i(8,"td"),l(9),o(),i(10,"td"),l(11),o(),i(12,"td"),l(13),p(14,"date"),o(),i(15,"td"),l(16),p(17,"date"),o(),i(18,"td",24),l(19),p(20,"amountFraction"),o(),i(21,"td",24),l(22),p(23,"number"),o(),i(24,"td",25),l(25),p(26,"number"),o(),i(27,"td")(28,"a",31),f(29,"i",32),o()()()),t&2){let e=d.$implicit,n=m(3);a(),_(n.roleService.shift!=null&&n.roleService.shift.Void?1:-1),a(3),x(" ",e.LoginID," "),a(2),c("routerLink",z(26,sa))("queryParams",T(27,ma,e.ID)),a(),b(e.Number),a(2),b(e.EntityName),a(2),b(e.Register),a(2),b(y(14,14,e.Start,"dd MMM yyyy HH:mm")),a(3),b(y(17,17,e.End,"dd MMM yyyy HH:mm")),a(3),x(" ",C(20,20,e.Sales+e.Tax+e.Surcharge)," "),a(3),b(C(23,22,e.Invoice_Count)),a(3),b(C(26,24,e.Visitors)),a(3),c("routerLink",z(29,pa))("queryParams",T(30,ca,e.ID))}}function ya(t,d){if(t&1){let e=I();i(0,"div",4)(1,"div",17)(2,"table",18)(3,"thead",19)(4,"tr"),u(5,ga,2,0,"th",20),i(6,"th",21),l(7,"Cashier"),o(),i(8,"th"),l(9,"Number"),o(),i(10,"th"),l(11,"Outlet"),o(),i(12,"th"),l(13,"Register"),o(),i(14,"th",22),l(15,"Open"),o(),i(16,"th",22),l(17,"Close"),o(),i(18,"th",23),l(19," Sales "),o(),i(20,"th",24),l(21,"Invoices"),o(),i(22,"th",25),l(23,"Visitors"),o(),f(24,"th",20),o()(),i(25,"tbody"),k(26,ha,30,32,"tr",26,H),o()()(),i(28,"div",27)(29,"POS-complex-pagination",28,1),v("jumpToPage",function(){S(e);let r=m(2);return h(r.getListData())})("previousPage",function(){S(e);let r=m(2);return h(r.getListData())})("nextPage",function(){S(e);let r=m(2);return h(r.getListData())}),V("reloadRowCountChange",function(r){S(e);let s=m(2);return F(s.reloadRowCount,r)||(s.reloadRowCount=r),h(r)}),o()()()}if(t&2){let e=m(2);a(5),_(e.roleService.shift!=null&&e.roleService.shift.Void?5:-1),a(21),B(e.data().Data),a(3),c("total",e.data().Data.length)("pageData",e.pageData()),P("reloadRowCount",e.reloadRowCount)}}function va(t,d){t&1&&f(0,"unauthorized-page",5)}function ba(t,d){if(t&1){let e=I();i(0,"mainpanel-cmp",3),V("textChange",function(r){S(e);let s=m();return F(s.pageData().Filter.Number,r)||(s.pageData().Filter.Number=r),h(r)}),v("onSubmit",function(){S(e);let r=m();return h(r.searchFromPageOne())}),V("filterChange",function(r){S(e);let s=m();return F(s.pageData().Filter,r)||(s.pageData().Filter=r),h(r)}),u(1,Ca,4,3,"actions"),i(2,"filters"),tt(3,xa,12,8,"ng-template",null,0,it),o(),i(5,"content"),u(6,ya,31,4,"div",4)(7,va,1,0,"unauthorized-page",5),o()()}if(t&2){let e=m();c("pageData",e.menuData()),P("text",e.pageData().Filter.Number),c("isFilterOnDropdown",!1),P("filter",e.pageData().Filter),c("hideSearchDropdown",!(e.roleService.shift!=null&&e.roleService.shift.View)),a(),_(e.roleService.shift!=null&&e.roleService.shift.View?1:-1),a(5),_(e.roleService.shift!=null&&e.roleService.shift.View?6:7)}}var Jt=class t extends $e{roleService=j(Ie);matDialog=j(_e);exp=j(je);constructor(d,e,n,r){super(d,e,"Shift/ClosureHistoryList","ShiftLoader/EndOFShift",r)}openExportModal(){this.matDialog.open(ft,{data:{title:"Shift",exportTypes:[{ID:"ShiftExport/EndOFShiftList",Value:"Default"},{ID:"ShiftExport/ExportPreviousShift",Value:"Shift Detail"},{ID:"ShiftExport/ExportShiftwithPaymentDetail",Value:"With Payment Detail"}],filterExport:this.pageData().Filter,getAllDataLengthAPI:"",pagination:!0,selectedData:this.data().Data.map(d=>({Label:`${d.Number} - ${d.EntityName}`,Value:d.ID,GroupBy:"SHIFT"}))}})}static \u0275fac=function(e){return new(e||t)(D(Ce),D(te),D(ze),D(X))};static \u0275cmp=N({type:t,selectors:[["POS-previous-shift"]],standalone:!1,features:[G],decls:1,vars:1,consts:[["pageFilterTemplate",""],["complexPagination",""],[3,"pageData","text","isFilterOnDropdown","filter","hideSearchDropdown"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","hideSearchDropdown"],[1,"container-fluid","mt-3"],["roleMessage","Shift View Role"],[1,"btn","btn-outline-secondary","me-3"],["matTooltipPosition","above","matTooltip","Add Product",1,"btn","btn-success",3,"routerLink"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"fa-solid","fa-trash","me-3"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["name","OrderBy",3,"modelChange","model","options"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","14px"],[2,"width","120px"],[2,"width","140px"],["matTooltip","Sales including tax and surcharges","matTooltipPosition","above",1,"text-end"],[1,"text-end"],[1,"text-center"],[1,"border-bottom"],[1,"me-auto","mt-3"],["api","shift/previous-shift-count",3,"jumpToPage","previousPage","nextPage","reloadRowCountChange","total","pageData","reloadRowCount"],["type","checkbox",3,"change"],[3,"routerLink","queryParams"],["target","_blank",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&u(0,ba,8,7,"mainpanel-cmp",2),e&2&&_(n.data()?0:-1)},dependencies:[xe,q,wt,Y,K,fe,we,Ct,Bt,ue,Ui,ie,U,pe],encapsulation:2,changeDetection:0})};var ln=(t,d)=>({"text-success":t,"text-danger":d}),_i=(t,d)=>({show:t,active:d}),fi=t=>({active:t}),Ea=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],Da=t=>({ID:t}),Ma=t=>({"text-danger":t}),Ia=(t,d,e)=>({"text-success":t,"text-warning":d,"text-danger":e}),Ta=()=>[];function wa(t,d){if(t&1&&(i(0,"div",0),l(1),o()),t&2){let e=m(2);a(),x(" ",e.data().Warning," ")}}function Pa(t,d){if(t&1&&f(0,"POS-shift-detail-card",1),t&2){let e=m(2);c("Name",e.data().Cashier)("OutletName",e.data().EntityName)("RegisterName",e.data().Register.Name)("Start",e.data().RegisterStartWithTimezone)("End",e.data().RegisterEndWithTimezone)("Invoices",e.data().Invoices)("VoidInvoice",e.data().VoidInvoice)("Sales",e.data().Session.Sales)("Surcharge",e.data().Session.Surcharge)("Tax",e.data().Session.Tax)("StartDate",e.data().RegisterStartWithTimezone)("EndDate",e.data().RegisterEndWithTimezone)("CurrencySymbol",e.data().Session.PrimaryCurrencySymbol)("totalSalesVisible",e.totalSalesVisible())}}function Fa(t,d){if(t&1&&(i(0,"small",9),p(1,"sum"),l(2),p(3,"sum"),p(4,"sum"),p(5,"amountFraction"),p(6,"sum"),p(7,"amountFraction"),o()),t&2){let e,n=m(3);c("matTooltip",((e=n.data().rounding)==null?null:e.RoundingValue)!=="None"?((e=n.data().rounding)==null?null:e.RoundingValue)+" Rounding with "+((e=n.data().rounding)==null?null:e.RoundingMethod)+" Method Enabled":"")("ngClass",n.data().Session.Sales+n.data().Session.Tax+n.data().Session.Surcharge-y(1,3,n.data().Payment,"Received")>0?"bg-gradient-success":"bg-gradient-danger"),a(2),x(" ",n.data().Session.Sales+n.data().Session.Tax+n.data().Session.Surcharge-y(3,6,n.data().Payment,"Received")>0?"+"+C(5,12,n.data().Session.Sales+n.data().Session.Tax+n.data().Session.Surcharge-y(4,9,n.data().Payment,"Received")):C(7,17,n.data().Session.Sales+n.data().Session.Tax+n.data().Session.Surcharge-y(6,14,n.data().Payment,"Received"))," compared with sales ")}}function Va(t,d){t&1&&(i(0,"th",16),l(1,"Received"),o())}function Ra(t,d){t&1&&(i(0,"th",16),l(1,"Expected"),o())}function Na(t,d){t&1&&(i(0,"th",17),l(1," Differences "),o())}function Oa(t,d){if(t&1&&(i(0,"td",19),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;a(),x(" ",C(2,1,e.Received)," ")}}function ka(t,d){if(t&1&&(i(0,"td",19),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;a(),x(" ",C(2,1,e.Expected)," ")}}function Ba(t,d){if(t&1&&(i(0,"td",20),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;c("ngClass",Q(4,ln,e.ShortOver>0,e.ShortOver<0)),a(),x(" ",C(2,2,e.ShortOver)," ")}}function La(t,d){if(t&1&&(i(0,"tr")(1,"td"),l(2),o(),i(3,"td",19),l(4),p(5,"amountFraction"),o(),u(6,Oa,3,3,"td",19),u(7,ka,3,3,"td",19),i(8,"td",19),l(9),p(10,"amountFraction"),o(),u(11,Ba,3,7,"td",20),i(12,"td",19),l(13),o()()),t&2){let e=d.$implicit,n=m(4);a(2),b(e.Name),a(2),x(" ",C(5,7,e.Start)," "),a(2),_(n.data().PaymentReceiveVisible?6:-1),a(),_(n.data().ExpectedPaymentVisible?7:-1),a(2),x(" ",C(10,9,e.Amount)," "),a(2),_(n.data().ExpectedPaymentVisible?11:-1),a(2),b(e.Note)}}function Aa(t,d){if(t&1&&(i(0,"td",21),l(1),p(2,"sum"),p(3,"amountFraction"),o()),t&2){let e=m(5);a(),x(" ",C(3,4,y(2,1,e.data().Payment,"Received"))," ")}}function Ha(t,d){if(t&1&&(i(0,"tfoot")(1,"tr")(2,"th",19),l(3,"Total:"),o(),i(4,"td",21),l(5),p(6,"sum"),p(7,"amountFraction"),o(),u(8,Aa,4,6,"td",21),i(9,"td",21),l(10),p(11,"sum"),p(12,"amountFraction"),o(),i(13,"td",21),l(14),p(15,"sum"),p(16,"amountFraction"),o(),i(17,"td",22),p(18,"sum"),p(19,"sum"),l(20),p(21,"sum"),p(22,"amountFraction"),o()()()),t&2){let e=m(4);a(5),x(" ",C(7,9,y(6,6,e.data().Payment,"Start"))," "),a(3),_(e.data().PaymentReceiveVisible?8:-1),a(2),x(" ",C(12,14,y(11,11,e.data().Payment,"Expected"))," "),a(4),x(" ",C(16,19,y(15,16,e.data().Payment,"Amount"))," "),a(3),c("ngClass",Q(32,ln,y(18,21,e.data().Payment,"ShortOver")>0,y(19,24,e.data().Payment,"ShortOver")<0)),a(3),x(" ",C(22,30,y(21,27,e.data().Payment,"ShortOver"))," ")}}function Wa(t,d){if(t&1&&(i(0,"table",13)(1,"thead",14)(2,"tr")(3,"th",15),l(4," Payment "),o(),i(5,"th",16),l(6,"Start"),o(),u(7,Va,2,0,"th",16),u(8,Ra,2,0,"th",16),i(9,"th",16),l(10,"Counted"),o(),u(11,Na,2,0,"th",17),i(12,"th",18),l(13,"Note"),o()()(),i(14,"tbody"),k(15,La,14,11,"tr",null,H),o(),u(17,Ha,23,35,"tfoot"),o()),t&2){let e=m(3);a(7),_(e.data().PaymentReceiveVisible?7:-1),a(),_(e.data().ExpectedPaymentVisible?8:-1),a(3),_(e.data().ExpectedPaymentVisible?11:-1),a(4),B(e.data().Payment),a(2),_(e.data().ExpectedPaymentVisible?17:-1)}}function $a(t,d){if(t&1&&(i(0,"div",2)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h2",8),l(5,"Payment Summary"),o(),u(6,Fa,8,19,"small",9),p(7,"sum"),o(),i(8,"div",10)(9,"div",11)(10,"div",12),u(11,Wa,18,4,"table",13),o()()()()()()),t&2){let e=m(2);a(6),_(e.data().Session.Sales+e.data().Session.Tax+e.data().Session.Surcharge-y(7,2,e.data().Payment,"Received")!==0?6:-1),a(5),_(e.data().Payment.length>0?11:-1)}}function ja(t,d){if(t&1&&(i(0,"li",24)(1,"a",50),l(2,"Invoice"),o()()),t&2){let e=m(3);a(),$(T(2,fi,e.data().InvoiceVisible))}}function za(t,d){if(t&1){let e=I();i(0,"li",24)(1,"a",51),v("click",function(){S(e);let r=m(3);return h(r.openTab("payment"))}),l(2,"Payment"),o()()}if(t&2){let e=m(3);a(),$(T(2,fi,!e.data().InvoiceVisible))}}function qa(t,d){if(t&1){let e=I();i(0,"li",24)(1,"a",52),v("click",function(){S(e);let r=m(3);return h(r.openTab("void"))}),l(2,"Voided Invoice"),o()()}}function Ua(t,d){if(t&1&&(i(0,"li",24)(1,"a",53),l(2,"Bank Note"),o()()),t&2){let e=m(3);a(),$(T(2,fi,!e.data().InvoiceVisible&&!e.data().PaymentReceiveVisible))}}function Ga(t,d){if(t&1&&(f(0,"td",64),p(1,"date")),t&2){let e=m().$implicit;c("innerHTML",y(1,1,e.Created,"dd MMM yyyy"),w)}}function Ja(t,d){if(t&1&&(f(0,"td",64),p(1,"date")),t&2){let e=m().$implicit;c("innerHTML",y(1,1,e.Date,"dd MMM yyyy"),w)}}function Qa(t,d){if(t&1&&(i(0,"tr"),f(1,"td",65),i(2,"td"),f(3,"a",66),o(),u(4,Ga,2,4,"td",64),u(5,Ja,2,4,"td",64),f(6,"td",64),p(7,"date"),f(8,"td",65),p(9,"amountFraction"),f(10,"td",64),o()),t&2){let e=d.$implicit,n=d.$index,r=m(4);a(),c("innerHTML",n+1,w),a(2),c("routerLink",z(18,Ea))("queryParams",T(19,Da,e.ID))("innerHTML",e.Number,w),a(),_(r.data().Session.Type==0?4:-1),a(),_(r.data().Session.Type!=0?5:-1),a(),c("innerHTML",y(7,13,e.Created,"HH:mm"),w),a(2),$(T(21,Ma,e.SalesNTax<0)),c("innerHTML",C(9,16,e.SalesNTax),w),a(2),$(He(23,Ia,e.PaymentStateID==3,e.PaymentStateID==2,e.PaymentStateID==1)),c("innerHTML",e.PaymentState,w)}}function Xa(t,d){if(t&1){let e=I();i(0,"div",31)(1,"div",54)(2,"div",55)(3,"div",10)(4,"table",56),v("matSortChange",function(r){S(e);let s=m(3);return h(s.sort(r))}),i(5,"thead",42)(6,"tr")(7,"th",57),l(8," No "),o(),i(9,"th",58),l(10," Number "),o(),i(11,"th",59),l(12," Date "),o(),i(13,"th",60),l(14," Time "),o(),i(15,"th",61),l(16,"Nett"),o(),i(17,"th",62),l(18,"Payment"),o()()(),i(19,"tbody"),k(20,Qa,11,27,"tr",null,H),o(),i(22,"tfoot")(23,"tr"),f(24,"td",63),i(25,"td",19),f(26,"b",64),p(27,"sum"),p(28,"amountFraction"),o(),f(29,"td"),o()()()()()()()}if(t&2){let e=m(3);a(20),B(e.data().Invoices),a(6),c("innerHTML",C(28,4,y(27,1,e.data().Invoices,"SalesNTax")),w)}}function Ya(t,d){t&1&&(i(0,"div",31)(1,"div",54)(2,"div",55)(3,"div",10)(4,"div",67)(5,"h4"),l(6," Your access to view invoice in the shift is disabled, please contact your administrator to view the invoice list! "),o()()()()()())}function Ka(t,d){if(t&1&&f(0,"POS-join-invoice",33),t&2){let e,n,r,s,g,L=m(3);c("RegisterID",(e=L.data().Session)==null?null:e.RegisterID)("SessionID",(n=L.data().Session)==null?null:n.ID)("Start",(r=L.data().Session)==null?null:r.Start)("SessionType",(s=L.data().Session)==null?null:s.Type)("End",(g=L.data().Session)==null?null:g.End)}}function Za(t,d){if(t&1&&f(0,"POS-voided-invoice",35),t&2){let e,n,r,s,g=m(3);c("RegisterID",(e=g.data().Session)==null?null:e.RegisterID)("SessionID",(n=g.data().Session)==null?null:n.ID)("Start",(r=g.data().Session)==null?null:r.Start)("End",(s=g.data().Session)==null?null:s.End)}}function er(t,d){if(t&1&&f(0,"POS-payment-receive",69),t&2){let e,n,r,s,g=m(4);c("RegisterID",(e=g.data().Session)==null?null:e.RegisterID)("SessionID",(n=g.data().Session)==null?null:n.ID)("Start",(r=g.data().Session)==null?null:r.Start)("PaymentMethods",g.data().PaymentMethods)("End",(s=g.data().Session)==null?null:s.End)}}function tr(t,d){if(t&1&&(i(0,"div",68),u(1,er,1,5,"POS-payment-receive",69),o()),t&2){let e=m(3);$(Q(3,_i,!e.data().InvoiceVisible&&e.data().PaymentReceiveVisible,!e.data().InvoiceVisible&&e.data().PaymentReceiveVisible)),a(),_(e.isTabOpened("payment")?1:-1)}}function ir(t,d){if(t&1&&(i(0,"POS-expense",70),v("showExpenseModal",function(){return null})("deleteExpenses",function(){return null}),o()),t&2){let e=m(3);c("Expenses",e.data().Expenses??z(4,Ta))("InputMode",e.data().InputMode)("Session",e.data().Session)("isEditMode",!1)}}function nr(t,d){t&1&&(i(0,"th",44),l(1," Qty "),o())}function or(t,d){if(t&1){let e=I();i(0,"td")(1,"input",74),V("ngModelChange",function(r){S(e);let s=m().$implicit;return F(s.Quantity,r)||(s.Quantity=r),h(r)}),v("keyup",function(){S(e);let r=m().$implicit,s=m(3);return h(s.DenominationTotal(r))}),o()()}if(t&2){let e=m().$implicit;a(),P("ngModel",e.Quantity)}}function ar(t,d){if(t&1&&(i(0,"tr")(1,"td",71),l(2),o(),i(3,"td",72),l(4),p(5,"number"),o(),u(6,or,2,1,"td"),i(7,"td",73),l(8),p(9,"amountFraction"),o()()),t&2){let e,n,r=d.$implicit,s=m(3);a(2),b(r.PriceDisplay),a(),c("hidden",s.data().Session&&s.data().InputMode&&((e=s.data().Session)==null?null:e.Bin)),a(),x(" ",C(5,5,r.Quantity)," "),a(2),_(s.data().Session&&s.data().InputMode&&!((n=s.data().Session)!=null&&n.Bin)?6:-1),a(2),x(" ",C(9,7,r.Total)," ")}}function rr(t,d){if(t&1&&f(0,"POS-sales-return",35),t&2){let e,n,r,s,g=m(3);c("RegisterID",(e=g.data().Session)==null?null:e.RegisterID)("SessionID",(n=g.data().Session)==null?null:n.ID)("Start",(r=g.data().Session)==null?null:r.Start)("End",(s=g.data().Session)==null?null:s.End)}}function lr(t,d){if(t&1&&f(0,"POS-loyalty-point",35),t&2){let e,n,r,s,g=m(3);c("RegisterID",(e=g.data().Session)==null?null:e.RegisterID)("SessionID",(n=g.data().Session)==null?null:n.ID)("Start",(r=g.data().Session)==null?null:r.Start)("End",(s=g.data().Session)==null?null:s.End)}}function dr(t,d){if(t&1){let e=I();i(0,"div",2)(1,"div",5)(2,"ul",23),u(3,ja,3,4,"li",24),u(4,za,3,4,"li",24),i(5,"li",24)(6,"a",25),v("click",function(){S(e);let r=m(2);return h(r.openTab("sales_return"))}),l(7,"Sales Return"),o()(),u(8,qa,3,0,"li",24),i(9,"li",24)(10,"a",26),v("click",function(){S(e);let r=m(2);return h(r.openTab("loyalty_point"))}),l(11,"Loyalty Point"),o()(),i(12,"li",24)(13,"a",27),v("click",function(){S(e);let r=m(2);return h(r.openTab("join_invoice"))}),l(14,"Join Invoice"),o()(),i(15,"li",24)(16,"a",28),v("click",function(){S(e);let r=m(2);return h(r.openTab("expense"))}),l(17,"Expense"),o()(),u(18,Ua,3,4,"li",24),o(),i(19,"div",29)(20,"div",30),u(21,Xa,30,6,"div",31)(22,Ya,7,0,"div",31),o(),i(23,"div",32),u(24,Ka,1,5,"POS-join-invoice",33),o(),i(25,"div",34)(26,"div",31),u(27,Za,1,4,"POS-voided-invoice",35),o()(),u(28,tr,2,6,"div",36),i(29,"div",37),u(30,ir,1,5,"POS-expense",38),o(),i(31,"div",39)(32,"div",31)(33,"div",5)(34,"div",40)(35,"div",10)(36,"table",41)(37,"thead",42)(38,"tr")(39,"th",43),l(40,"Cash Denomination"),o(),u(41,nr,2,0,"th",44),i(42,"th",45),l(43," Total "),o()()(),i(44,"tbody"),k(45,ar,10,9,"tr",null,H),o(),i(47,"tfoot")(48,"tr")(49,"th",46),l(50,"Total:"),o(),i(51,"td",47),l(52),p(53,"sum"),p(54,"amountFraction"),o()()()()()()()()(),i(55,"div",48),u(56,rr,1,4,"POS-sales-return",35),o(),i(57,"div",49),u(58,lr,1,4,"POS-loyalty-point",35),o()()()()}if(t&2){let e,n=m(2);a(3),_(n.data().InvoiceVisible?3:-1),a(),_(n.data().Session!=null&&n.data().PaymentReceiveVisible?4:-1),a(4),_(n.data().InvoiceVisible?8:-1),a(10),_(n.data().Session?18:-1),a(2),$(Q(22,_i,n.data().InvoiceVisible,n.data().InvoiceVisible)),a(),_(n.data().Session!=null&&n.data().InvoiceVisible?21:22),a(3),_(n.isTabOpened("join_invoice")?24:-1),a(3),_(n.data().InvoiceVisible&&n.isTabOpened("void")?27:-1),a(),_(n.data().PaymentReceiveVisible?28:-1),a(2),_(n.isTabOpened("expense")?30:-1),a(),$(Q(25,_i,!n.data().InvoiceVisible&&!n.data().PaymentReceiveVisible,!n.data().InvoiceVisible&&!n.data().PaymentReceiveVisible)),a(10),_((e=n.data().Session)!=null&&e.Bin?-1:41),a(4),B(n.data().Denominations),a(7),x(" ",C(54,20,y(53,17,n.data().Denominations,"Total"))," "),a(4),_(n.isTabOpened("sales_return")?56:-1),a(2),_(n.isTabOpened("loyalty_point")?58:-1)}}function sr(t,d){if(t&1&&(i(0,"span")(1,"b"),l(2,"Modified:"),o(),l(3),p(4,"date"),o()),t&2){let e=m(2);a(3),he(" ",y(4,2,e.data().Session.Modified,"dd MMM yyyy HH:mm")," / ",e.data().Session.ModifierName," ")}}function mr(t,d){if(t&1&&(i(0,"div"),u(1,wa,2,1,"div",0),u(2,Pa,1,14,"POS-shift-detail-card",1),u(3,$a,12,5,"div",2),u(4,dr,59,28,"div",2),i(5,"div",3),f(6,"i",4),i(7,"span")(8,"b"),l(9,"Created:"),o(),l(10),p(11,"date"),o(),u(12,sr,5,5,"span"),o()()),t&2){let e=m();a(),_(e.data().Warning!=null||e.data().Warning!=null?1:-1),a(),_(e.data().Session?2:-1),a(),_(e.data().Session?3:-1),a(),_(e.data().Session?4:-1),a(6),he(" ",y(11,7,e.data().Session.Created,"dd MMM yyyy HH:mm")," / ",e.data().Session.CreatorName," "),a(2),_(e.data().Session.ModifierName?12:-1)}}var Qt=class t{constructor(d,e,n){this.datePipe=d;this.Service=e;this.localData=n}datePipe;Service;localData;isEdit=M(!1);originalData=M(null);data=M(null);InputMode=M(!1);activeTab=E("invoice");openedTabs=E(new Set(["invoice"]));openTab(d){let e=this.openedTabs();if(!e.has(d)){let n=new Set(e);n.add(d),this.openedTabs.set(n)}this.activeTab.set(d)}isTabOpened(d){return this.openedTabs().has(d)}loyalty=E(!0);salesreturn=E(!0);void=E(!0);denomination=E(!0);paymentReceived=E(!0);invoice=E(!0);expense=E(!0);register=E(!0);totalSalesVisible=E(!0);ngOnChanges(d){d.data&&this.totalSalesVisible.set(this.data()?.TotalSalesVisible)}sort(d){let e=this.data().Invoices;if(!d.active||d.direction===""){this.data().Invoices=this.originalData;return}this.data().Invoices=e.sort((n,r)=>{let s=d.direction==="asc";return this.compare(n[d.active],r[d.active],s)})}compare(d,e,n){return(d<e?-1:1)*(n?1:-1)}myFunct=function(d){this.data().ExpectedPaymentVisible?(d.Amount=d.AmountSUM+d.Start*1,d.ShortOver=d.AmountSUM+d.Start*1-d.Amount):(d.AmountSUM=0,d.Amount=d.Start,d.ShortOver=0)};DenominationTotal=function(d){d.Total=d.Amount*d.Quantity};ChangeDifferences=function(d){this.Data.ExpectedPaymentVisible?d.ShortOver=d.Amount-(d.AmountSUM+d.Start*1):(d.AmountSUM=0,d.ShortOver=0)};filterAmount(d,e,n){return d.filter(function(r){return r[e]==n})}static \u0275fac=function(e){return new(e||t)(D(U),D(te),D(ot))};static \u0275cmp=N({type:t,selectors:[["shift-info"]],inputs:{isEdit:[1,"isEdit"],originalData:[1,"originalData"],data:[1,"data"],InputMode:[1,"InputMode"]},standalone:!1,features:[hi],decls:1,vars:1,consts:[["role","alert",1,"alert","alert-warning"],[3,"Name","OutletName","RegisterName","Start","End","Invoices","VoidInvoice","Sales","Surcharge","Tax","StartDate","EndDate","CurrencySymbol","totalSalesVisible"],[1,"row"],[1,"alert","alert-warning","cursor","w-100"],["aria-hidden","true",1,"fa-regular","fa-file","me-5"],[1,"col-sm-12"],[1,"card","w-100"],[1,"card-header","d-flex","align-items-end"],[1,"mb-0","me-2"],["matTooltipPosition","above",1,"text-body-secondary","fw-semibold","px-3","rounded","align-self-end",2,"border-radius","50rem",3,"matTooltip","ngClass"],[1,"card-body"],[1,"col-12",2,"padding-left","0","padding-right","0"],[1,"table-responsive"],[1,"table","table-bordered"],[1,"table-light"],[1,"border-end",2,"width","150px"],[1,"border-end","text-end","pe-10"],[1,"text-end","pe-10",2,"width","200px"],[1,"border-start","text-end","pe-10"],[1,"text-end"],[1,"text-end",3,"ngClass"],[1,"text-end","fw-bold"],[1,"text-end","fw-bold",3,"ngClass"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","return-tab","data-bs-toggle","tab","href","#return","role","tab","aria-controls","return","aria-selected","false",1,"nav-link",3,"click"],["id","loyalty-tab","data-bs-toggle","tab","href","#loyalty","role","tab","aria-controls","loyalty","aria-selected","false",1,"nav-link",3,"click"],["id","invoice-tab","data-bs-toggle","tab","href","#joinInvoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link",3,"click"],["id","expense-tab","data-bs-toggle","tab","href","#expense","role","tab","aria-controls","expense","aria-selected","false",1,"nav-link",3,"click"],["id","myTabContent",1,"tab-content"],["id","invoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"row","g-0"],["id","joinInvoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"RegisterID","SessionID","Start","SessionType","End"],["id","void","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"RegisterID","SessionID","Start","End"],["id","payment","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0",3,"class"],["id","expense","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"Expenses","InputMode","Session","isEditMode"],["id","bank","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"card","border-top-0"],[1,"table","table-bordered","custom-table"],[1,"thead-light"],[1,"border-end"],[1,"border-end","text-end",2,"width","100px"],[1,"text-end","pe-8",2,"width","240px"],["colspan","2",1,"text-end"],[1,"text-end","pe-8","fw-bold"],["id","return","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["id","loyalty","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["id","invoice-tab","data-bs-toggle","tab","href","#invoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link"],["id","payment-tab","data-bs-toggle","tab","href","#payment","role","tab","aria-controls","payment","aria-selected","true",1,"nav-link",3,"click"],["id","void-tab","data-bs-toggle","tab","href","#void","role","tab","aria-controls","void","aria-selected","false",1,"nav-link",3,"click"],["id","bank-tab","data-bs-toggle","tab","href","#bank","role","tab","aria-controls","bank","aria-selected","false",1,"nav-link"],[1,"col"],[1,"card","me-5","border-top-0"],["matSort","",1,"table","table-bordered",3,"matSortChange"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end",2,"width","200px"],[1,"border-end",2,"width","85px"],[1,"border-end",2,"width","30px"],[1,"text-end","border-end"],[2,"width","60px"],["colspan","4"],[3,"innerHTML"],[1,"text-end",3,"innerHTML"],[1,"text-primary",3,"routerLink","queryParams","innerHTML"],[1,"d-flex","align-items-center","justify-content-center",2,"height","100px"],["id","payment","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"RegisterID","SessionID","Start","PaymentMethods","End"],[3,"showExpenseModal","deleteExpenses","Expenses","InputMode","Session","isEditMode"],[1,"fw-bold"],[1,"text-end",3,"hidden"],[1,"text-end","pe-8"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModelChange","keyup","ngModel"]],template:function(e,n){e&1&&u(0,mr,13,10,"div"),e&2&&_(n.data()?0:-1)},dependencies:()=>[ce,ae,Y,K,le,q,wi,ue,Me,Ve,Re,Ne,Oe,Fe,ke,ie,U,De,pe],encapsulation:2,changeDetection:0})},Xt=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=et({type:t});static \u0275inj=Ze({imports:[ne,de,re,at,Pt,Qe,Ft,We,Me,Ve,Re,Ne,Oe,Fe,ke]})};var cr=()=>["/print/shift-detail"],ur=t=>({id:t}),_r=()=>["/menu/Shift/Main/Previous_Shift/Register_Shift_Form"],fr=t=>({ID:t});function Cr(t,d){if(t&1){let e=I();i(0,"a",7),v("click",function(){S(e);let r=m(3);return h(r.export(r.data().Session.ID))}),f(1,"i",8),l(2," Export "),o()}}function xr(t,d){if(t&1&&(i(0,"div",1)(1,"a",4),f(2,"i",5),l(3," Print "),o(),u(4,Cr,3,0,"a",6),o()),t&2){let e=m(2);a(),c("routerLink",z(3,cr))("queryParams",T(4,ur,e.data().Session.ID)),a(3),_(e.roleService.global.Export?4:-1)}}function gr(t,d){if(t&1&&(i(0,"a",9),f(1,"i",11),l(2," Edit "),o()),t&2){let e=m(4);c("routerLink",z(2,_r))("queryParams",T(3,fr,e.data().Session.ID))}}function Sr(t,d){if(t&1){let e=I();i(0,"a",12),v("click",function(){S(e);let r=m(4);return h(r.onVoid(r.data().Session.ID))}),f(1,"i",13),l(2," Void"),o()}}function hr(t,d){if(t&1&&(i(0,"div",1),u(1,gr,3,5,"a",9),u(2,Sr,3,0,"a",10),o()),t&2){let e=m(3);a(),_(e.roleService.shift!=null&&e.roleService.shift.Edit?1:-1),a(),_(e.roleService.shift!=null&&e.roleService.shift.Void?2:-1)}}function yr(t,d){if(t&1){let e=I();i(0,"a",12),v("click",function(){S(e);let r=m(4);return h(r.onErase(r.data().Session.ID))}),f(1,"i",13),l(2," Erase"),o()}}function vr(t,d){if(t&1&&u(0,yr,3,0,"a",10),t&2){let e=m(3);_(e.roleService.order!=null&&e.roleService.order.Erase?0:-1)}}function br(t,d){if(t&1&&u(0,hr,3,2,"div",1)(1,vr,1,1),t&2){let e,n=m(2);_(((e=n.data().Session)==null?null:e.Bin)==!1?0:1)}}function Er(t,d){if(t&1&&(i(0,"mainpanel-cmp",0)(1,"actions"),u(2,xr,5,6,"div",1),u(3,br,2,1),o(),i(4,"content")(5,"div",2),f(6,"shift-info",3),o()()()),t&2){let e=m();c("pageData",e.menuData())("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),_(e.data().Session.ID?2:-1),a(),_(e.data().Session.ID?3:-1),a(3),c("data",e.data())("InputMode",e.InputMode())("originalData",e.originalData())}}var Yt=class t extends $e{constructor(e,n,r,s,g){super(n,r,"shift/detail",void 0,g,s);this.csvConverter=e;this.activatedRoute=s;this.toaster=g}csvConverter;activatedRoute;toaster;PrintUrl=E("");Notes=E("");Visitors=E("");InputMode=E(!1);Detail=E(!0);MessageInfo=E("");csvPrefixFormat=E(null);originalData=E(null);roleService=j(Ie);matDialog=j(_e);router=j(Tt);exp=j(je);postInit(e){if(this.originalData.set(e.Invoices),e.PageTitle!=null){let n=e.Session?.Bin;this.menuData.update(r=>A(O({},r),{H:e.PageTitle}))}}preGetList(){if(this.route){let n={ID:this.route.snapshot.queryParams.ID};this.pageData.update(r=>A(O({},r),{Filter:n}))}}RefreshSalesTax(){let e={Invoices:this.data().Invoices,Session:this.data().Session,VoidInvoice:this.data().VoidInvoice};this.httpService.post("/API/Report/RefreshValueSalesTax",e).subscribe({next:n=>{this.data.update(r=>A(O({},r),{Session:n}))},error:n=>this.toaster.error(n,oe.Error)})}onVoid(e){if(confirm("Are you sure you want to void this record?")&&e!=null){let n={ID:e};this.httpService.post("/API/Shift/voidEndOfShiftDetail",n).subscribe({next:r=>{this.getListData(),this.toaster.success("Records have been successfully voided",oe.Success)},error:r=>this.toaster.error(r,oe.Error)})}}onErase(e){if(confirm("Are you sure you want to erase this record?")&&e!=null){let n={ID:e};this.httpService.post("/API/Shift/EraseEndOFShiftDetail",n).subscribe({next:r=>{this.router.navigate(["/menu/Shift/Recycle_Bin/Voided_Shift"]),this.toaster.success("Records have been successfully deleted",oe.Success)},error:r=>this.toaster.error(r,oe.Error)})}}export(e){this.exp.exportXlsx("ShiftExport/EndOfShiftDetailExport",{ID:e})}static \u0275fac=function(n){return new(n||t)(D(ze),D(Ce),D(te),D(nt),D(X))};static \u0275cmp=N({type:t,selectors:[["POS-register-detail"]],standalone:!1,features:[G],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn-group","mx-3"],[1,"container-fluid","bg-light-gray","pt-4"],[3,"data","InputMode","originalData"],["matTooltipPosition","above","matTooltip","Print Original","target","_blank",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["matTooltipPosition","above","matTooltip","edit",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],["role","button",1,"btn","btn-outline-secondary"],[1,"fa-solid","fa-pen-to-square"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash"]],template:function(n,r){n&1&&u(0,Er,7,8,"mainpanel-cmp",0),n&2&&_(r.data()?0:-1)},dependencies:[xe,q,Qt,ue],encapsulation:2,changeDetection:0})};var Kt=class t{constructor(d,e){this.dialogRef=d;this.data=e;this.config.title="Close Shift",this.note=e.note,this.visitors=e.visitors}dialogRef;data;config=new ve;note;visitors;onOk(){this.dialogRef.close({note:this.note,visitors:this.visitors})}static \u0275fac=function(e){return new(e||t)(D(be),D(Ee))};static \u0275cmp=N({type:t,selectors:[["POS-modal-close-shift"]],standalone:!1,decls:14,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["id","desc","placeholder","Note","rows","6",1,"form-control","w-100",3,"ngModelChange","ngModel"],["for","desc"],["type","text","autoNum","","name","visitor",1,"form-control",3,"ngModelChange","ngModel"],["for","visitor"]],template:function(e,n){e&1&&(i(0,"modal-material",0),v("onOk",function(){return n.onOk()})("onCancel",function(){return n.dialogRef.close()})("onClose",function(){return n.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"textarea",4),V("ngModelChange",function(s){return F(n.note,s)||(n.note=s),s}),o(),i(6,"label",5),l(7,"Note"),o()()()(),i(8,"div",1)(9,"div",2)(10,"div",3)(11,"input",6),V("ngModelChange",function(s){return F(n.visitors,s)||(n.visitors=s),s}),o(),i(12,"label",7),l(13,"Visitors"),o()()()()()()),e&2&&(c("config",n.config),a(5),P("ngModel",n.note),a(6),P("ngModel",n.visitors))},dependencies:[ae,Y,K,re,le],encapsulation:2})};var dn=t=>({selected:t}),Zt=class t{constructor(d,e){this.dialogRef=d;this.data=e;this.config.update(n=>A(O({},n),{title:"Expense"})),e.expense?(this.expense.set(O({},e.expense)),this.action.set("EDIT")):this.expense.set({Amount:0,ExpenseID:ee.GuidEmpty,Name:"",Note:"",PaymentID:ee.GuidEmpty,PaymentName:""}),this.labels=e.labels,this.methods=e.paymentMethods}dialogRef;data;config=E(new ve);expense=E(null);labels=E(null);methods=E(null);action=E("ADD");toastr=j(X);onSelectLabel(d){this.expense.update(e=>A(O({},e),{Name:d.Name}))}onSelectMethod(d){this.expense.update(e=>A(O({},e),{PaymentName:d.Name}))}onOk(){if(ee.IsEmpty(this.expense().ExpenseID)){this.toastr.warning("Label cannot be empty.","Input Required");return}if(ee.IsEmpty(this.expense().PaymentID)){this.toastr.warning("Payment Method cannot be empty.","Input Required");return}this.dialogRef.close({action:this.action(),expense:this.expense()})}isNotEmpty=ee.IsNotEmpty;static \u0275fac=function(e){return new(e||t)(D(be),D(Ee))};static \u0275cmp=N({type:t,selectors:[["POS-modal-expense"]],standalone:!1,decls:26,vars:13,consts:[[3,"onOk","onClose","onCancel","config"],[2,"width","350px"],[1,"row"],[1,"col-sm-6"],[1,"form-floating-outline",3,"ngClass"],["id","label","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"change","ngModelChange","ngModel","items"],["for","label"],["id","payment","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"ngModelChange","change","ngModel","items"],["for","payment"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","name","Amount","autoNum","","autofocus","",1,"form-control",3,"ngModelChange","ngModel"],["for","amount"],["rows","5","id","desc","placeholder","Note",1,"form-control","w-100",3,"ngModelChange","ngModel"],["for","desc"]],template:function(e,n){e&1&&(i(0,"modal-material",0),v("onOk",function(){return n.onOk()})("onClose",function(){return n.dialogRef.close()})("onCancel",function(){return n.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"ng-select",5),v("change",function(s){return n.onSelectLabel(s)}),V("ngModelChange",function(s){return F(n.expense().ExpenseID,s)||(n.expense().ExpenseID=s),s}),o(),i(7,"label",6),l(8,"Select Label"),o()()(),i(9,"div",3)(10,"div",4)(11,"ng-select",7),V("ngModelChange",function(s){return F(n.expense().PaymentID,s)||(n.expense().PaymentID=s),s}),v("change",function(s){return n.onSelectMethod(s)}),o(),i(12,"label",8),l(13,"Payment Method"),o()()()(),i(14,"div",2)(15,"div",9)(16,"div",10)(17,"input",11),V("ngModelChange",function(s){return F(n.expense().Amount,s)||(n.expense().Amount=s),s}),o(),i(18,"label",12),l(19,"Amount"),o()()()(),i(20,"div",2)(21,"div",9)(22,"div",10)(23,"textarea",13),V("ngModelChange",function(s){return F(n.expense().Note,s)||(n.expense().Note=s),s}),o(),i(24,"label",14),l(25,"Note"),o()()()()()()()),e&2&&(c("config",n.config()),a(5),c("ngClass",T(9,dn,n.isNotEmpty(n.expense().ExpenseID))),a(),P("ngModel",n.expense().ExpenseID),c("items",n.labels()),a(4),c("ngClass",T(11,dn,n.isNotEmpty(n.expense().PaymentID))),a(),P("ngModel",n.expense().PaymentID),c("items",n.methods()),a(6),P("ngModel",n.expense().Amount),a(6),P("ngModel",n.expense().Note))},dependencies:[ce,ae,Y,K,re,fe,le],encapsulation:2,changeDetection:0})};var Ci=t=>({active:t}),sn=(t,d)=>({show:t,active:d}),Dr=(t,d)=>({active:t,show:d}),mn=(t,d)=>({"text-success":t,"text-danger":d}),ti=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],bt=t=>({ID:t}),Mr=(t,d,e)=>({"text-success":t,"text-warning":d,"text-danger":e}),Ir=t=>[t];function Tr(t,d){if(t&1){let e=I();i(0,"button",3),v("click",function(){S(e);let r=m(2);return h(r.onPreview())}),l(1," Preview "),o()}}function wr(t,d){if(t&1){let e=I();i(0,"button",4),v("click",function(){let r=S(e),s=m(2);return h(s.openCloseModal(r))}),l(1),p(2,"async"),o()}if(t&2){let e=m(2);a(),x(" ",C(2,1,e.isEdit$)?"Save":"Add"," ")}}function Pr(t,d){if(t&1){let e=I();i(0,"div",5)(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9)(5,"h3"),f(6,"i",10),l(7," Cashier"),o()(),i(8,"div",11)(9,"ng-select",12),p(10,"async"),v("ngModelChange",function(r){let s=S(e),g=m(3);return h(g.changeRegCash(s,r,"UserID"))}),o()(),i(11,"div",9)(12,"h3"),f(13,"i",13),l(14," Register"),o()(),i(15,"div",11)(16,"ng-select",14),p(17,"async"),p(18,"async"),v("ngModelChange",function(r){let s=S(e),g=m(3);return h(g.changeRegCash(s,r,"RegisterID"))}),o()(),i(19,"div",9)(20,"h3"),f(21,"i",15),l(22," Opening / Closing "),o()(),i(23,"div",11)(24,"div",16)(25,"div",17)(26,"div",18)(27,"div",19)(28,"datepicker",20),v("dateChange",function(r){let s=S(e),g=m(3);return h(g.onChangeDate(s,r,"Start"))}),o()(),i(29,"div",21)(30,"p-datepicker",22),v("ngModelChange",function(r){let s=S(e),g=m(3);return h(g.onChangeTime(s,r,"StartTime"))}),o()(),f(31,"hr",23),i(32,"div",19)(33,"datepicker",20),v("dateChange",function(r){let s=S(e),g=m(3);return h(g.onChangeDate(s,r,"End"))}),o()(),i(34,"div",24)(35,"p-datepicker",22),v("ngModelChange",function(r){let s=S(e),g=m(3);return h(g.onChangeTime(s,r,"EndTime"))}),o()()()()(),f(36,"br"),o()()()()()}if(t&2){let e=d,n=m(3);a(9),c("items",C(10,13,n.cashiers$))("ngModel",e.Form.UserID),a(7),c("readonly",C(17,15,n.isEdit$))("items",C(18,17,n.registers$))("ngModel",e.Form.RegisterID),a(12),c("date",e.Form.Start)("isFloatingLabel",!1),a(2),c("ngModel",e.Form.StartTime)("timeOnly",!0),a(3),c("date",e.Form.End)("isFloatingLabel",!1),a(2),c("ngModel",e.Form.EndTime)("timeOnly",!0)}}function Fr(t,d){if(t&1&&(u(0,Pr,37,19,"div",5),p(1,"async")),t&2){let e,n=m(2);_((e=C(1,1,n.endOfShiftForm$))?0:-1,e)}}function Vr(t,d){if(t&1&&(i(0,"small",70),p(1,"sum"),l(2),p(3,"sum"),p(4,"sum"),p(5,"amountFraction"),p(6,"sum"),p(7,"amountFraction"),o()),t&2){let e=m(2);c("matTooltip",(e.Rounding==null?null:e.Rounding.RoundingValue)!=="None"?(e.Rounding==null?null:e.Rounding.RoundingValue)+" Rounding with "+(e.Rounding==null?null:e.Rounding.RoundingMethod)+" Method Enabled":"")("ngClass",e.Session.Sales+e.Session.Tax+e.Session.Surcharge-y(1,3,e.Payments,"Received")>0?"bg-gradient-success":"bg-gradient-danger"),a(2),x(" ",e.Session.Sales+e.Session.Tax+e.Session.Surcharge-y(3,6,e.Payments,"Received")>0?"+"+C(5,12,e.Session.Sales+e.Session.Tax+e.Session.Surcharge-y(4,9,e.Payments,"Received")):C(7,17,e.Session.Sales+e.Session.Tax+e.Session.Surcharge-y(6,14,e.Payments,"Received"))," compared with sales ")}}function Rr(t,d){t&1&&(i(0,"th",74),l(1," Expected "),o())}function Nr(t,d){t&1&&(i(0,"th",75),l(1,"Differences"),o())}function Or(t,d){if(t&1&&(i(0,"td",75),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;a(),x(" ",C(2,1,e.Expected)," ")}}function kr(t,d){if(t&1&&(i(0,"td",75),l(1),p(2,"amountFraction"),o()),t&2){let e=m().$implicit;$(Q(5,mn,e.ShortOver>0,e.ShortOver<0)),a(),x(" ",C(2,3,e.ShortOver)," ")}}function Br(t,d){if(t&1){let e=I();i(0,"tr")(1,"td"),l(2),o(),i(3,"td",78)(4,"input",79),p(5,"amountFraction"),v("ngModelChange",function(r){let s=S(e).$implicit,g=m(2),L=m(3);return h(L.onChangeStart(g,s,r))}),o()(),i(6,"td",75),l(7),p(8,"amountFraction"),o(),u(9,Or,3,3,"td",75),i(10,"td",78)(11,"input",80),p(12,"amountFraction"),v("ngModelChange",function(r){let s=S(e).$implicit,g=m(2),L=m(3);return h(L.onChangeDifferences(g,s,r))}),o()(),u(13,kr,3,8,"td",81),i(14,"td")(15,"input",82),V("ngModelChange",function(r){let s=S(e).$implicit;return F(s.Note,r)||(s.Note=r),h(r)}),o()()()}if(t&2){let e=d.$implicit,n=m(2);a(2),b(e.Name),a(2),c("ngModel",C(5,8,e.Start))("disabled",!n.ExpectedPaymentVisible),a(3),x(" ",C(8,10,e.Received)," "),a(2),_(n.ExpectedPaymentVisible?9:-1),a(2),c("ngModel",C(12,12,e.Amount)),a(2),_(n.ExpectedPaymentVisible?13:-1),a(2),P("ngModel",e.Note)}}function Lr(t,d){if(t&1&&(i(0,"section",27)(1,"div",29)(2,"div",66)(3,"div",67)(4,"div",68)(5,"h2",69),l(6,"Payment Summary"),o(),u(7,Vr,8,19,"small",70),p(8,"sum"),o(),i(9,"div",11)(10,"div",66)(11,"table",71)(12,"thead",72)(13,"tr")(14,"th",45),l(15,"Payment"),o(),i(16,"th",73),l(17," Start "),o(),i(18,"th",74),l(19," Received "),o(),u(20,Rr,2,0,"th",74),i(21,"th",73),l(22," Counted "),o(),u(23,Nr,2,0,"th",75),i(24,"th",76),l(25," Note "),o()()(),i(26,"tbody"),k(27,Br,16,14,"tr",null,li().tbPayments,!0),o(),i(29,"tfoot")(30,"tr")(31,"th"),l(32,"Total:"),o(),i(33,"td",75)(34,"b"),l(35),p(36,"sum"),p(37,"amountFraction"),o()(),i(38,"td",75)(39,"b"),l(40),p(41,"sum"),p(42,"amountFraction"),o()(),i(43,"td",75)(44,"b"),l(45),p(46,"sum"),p(47,"amountFraction"),o()(),i(48,"td",75)(49,"b"),l(50),p(51,"sum"),p(52,"amountFraction"),o()(),i(53,"td",77),p(54,"sum"),p(55,"sum"),l(56),p(57,"sum"),p(58,"amountFraction"),o()()()()()()()()()()),t&2){let e=m();a(7),_(e.Session.Sales+e.Session.Tax+e.Session.Surcharge-y(8,10,e.Payments,"Received")!==0?7:-1),a(13),_(e.ExpectedPaymentVisible?20:-1),a(3),_(e.ExpectedPaymentVisible?23:-1),a(4),B(e.Payments),a(8),b(C(37,16,y(36,13,e.Payments,"Start"))),a(5),b(C(42,21,y(41,18,e.Payments,"Received"))),a(5),b(C(47,26,y(46,23,e.Payments,"Expected"))),a(5),b(C(52,31,y(51,28,e.Payments,"Amount"))),a(3),$(Q(44,mn,y(54,33,e.Payments,"ShortOver")>0,y(55,36,e.Payments,"ShortOver")<0)),a(3),x(" ",C(58,42,y(57,39,e.Payments,"ShortOver"))," ")}}function Ar(t,d){if(t&1&&(i(0,"li",32)(1,"a",83),l(2,"Payment"),o()()),t&2){let e=m();a(),c("ngClass",T(1,Ci,!e.InvoiceVisible))}}function Hr(t,d){t&1&&(i(0,"li",32)(1,"a",84),l(2,"Expense"),o()())}function Wr(t,d){if(t&1&&(i(0,"li",32)(1,"a",85),l(2,"Bank Note"),o()()),t&2){let e=m();a(),c("ngClass",T(1,Ci,!e.InvoiceVisible&&!e.PaymentReceiveVisible))}}function $r(t,d){t&1&&(i(0,"li",32)(1,"a",86),l(2,"Void Invoice"),o()())}function jr(t,d){t&1&&(i(0,"li",32)(1,"a",87),l(2,"Sales Return"),o()())}function zr(t,d){t&1&&(i(0,"li",32)(1,"a",88),l(2,"Loyalty Point History"),o()())}function qr(t,d){if(t&1&&(i(0,"tr"),f(1,"td",94),i(2,"td"),f(3,"a",95),o(),f(4,"td",96),p(5,"date"),f(6,"td",96),p(7,"date"),f(8,"td",94),p(9,"amountFraction"),f(10,"td",96),o()),t&2){let e=d.$implicit,n=d.$index;a(),c("innerHTML",n+1,w),a(2),c("routerLink",z(18,ti))("queryParams",T(19,bt,e.ID))("innerHTML",e.Number,w),a(),c("innerHTML",y(5,10,e.Created,"dd MMM yyyy"),w),a(2),c("innerHTML",y(7,13,e.Created,"HH:mm"),w),a(2),c("innerHTML",C(9,16,e.SalesNTax),w),a(2),$(He(21,Mr,e.PaymentStateID==3,e.PaymentStateID==2,e.PaymentStateID==1)),c("innerHTML",e.PaymentState,w)}}function Ur(t,d){if(t&1&&(i(0,"div",38)(1,"div",11)(2,"table",41)(3,"thead",42)(4,"tr",43)(5,"th",44),l(6," No "),o(),i(7,"th",50),l(8," Number "),o(),i(9,"th",89),l(10," Date "),o(),i(11,"th",90),l(12," Time "),o(),i(13,"th",51),l(14,"Nett"),o(),i(15,"th",91),l(16,"Payment"),o()()(),i(17,"tbody"),k(18,qr,11,25,"tr",null,H),o(),i(20,"tfoot")(21,"tr"),f(22,"td",92),i(23,"td",93),l(24),p(25,"sum"),p(26,"amountFraction"),o(),f(27,"td"),o()()()()()),t&2){let e=m();a(18),B(e.Invoices),a(6),x(" ",C(26,4,y(25,1,e.Invoices,"SalesNTax"))," ")}}function Gr(t,d){t&1&&(i(0,"div",39)(1,"div",17)(2,"div",97)(3,"div",11)(4,"div",98)(5,"h4"),l(6," Your access to view invoice in the shift is disabled, please contact your administrator to view the invoice list! "),o()()()()()())}function Jr(t,d){if(t&1&&(i(0,"th",46),l(1),o()),t&2){let e=d.$implicit;a(),x(" ",e.Name," ")}}function Qr(t,d){if(t&1&&(i(0,"td",46),l(1),p(2,"number"),o()),t&2){let e=d.$index,n=m().$implicit;a(),x(" ",C(2,1,n.Amounts[e])," ")}}function Xr(t,d){if(t&1&&(i(0,"tr")(1,"td",46),l(2),o(),i(3,"td")(4,"a",99),l(5),o()(),i(6,"td"),l(7),o(),k(8,Qr,3,3,"td",46,H),o()),t&2){let e=d.$implicit,n=d.$index,r=m();a(2),b(n+1),a(2),c("queryParams",T(5,bt,e.InvoiceID))("routerLink",T(7,Ir,e.TypeID==1?"/menu/Orders/Orders/Customer_Invoice/Info":"/menu/Debt/Debt/Join_Invoice/Info")),a(),b(e.Number),a(2),b(e.CustomerName),a(),B(r.PaymentMethods)}}function Yr(t,d){if(t&1&&(i(0,"td",46),l(1),p(2,"SumWithIndex"),p(3,"number"),o()),t&2){let e=d.$index,n=m();a(),x(" ",C(3,5,Mt(2,1,n.PaymentReceived,"Amounts",e))," ")}}function Kr(t,d){if(t&1){let e=I();i(0,"th",49)(1,"button",100),v("click",function(){S(e);let r=m(),s=m(3);return h(s.openModalExpense(r))}),f(2,"i",101),o()()}}function Zr(t,d){if(t&1){let e=I();i(0,"td",103)(1,"i",104),v("click",function(){S(e);let r=m().$index,s=m(),g=m(3);return h(g.removeExpense(s,r))}),o()()}}function el(t,d){if(t&1){let e=I();i(0,"tr",102),v("click",function(){let r=S(e),s=r.$implicit,g=r.$index,L=m(),W=m(3);return h(W.openModalExpense(L,g,s))}),u(1,Zr,2,0,"td",103),i(2,"td"),l(3),o(),i(4,"td",46),l(5),p(6,"number"),o(),i(7,"td"),l(8),o(),i(9,"td"),l(10),o()()}if(t&2){let e=d.$implicit,n=m();a(),_(n.InputMode?1:-1),a(2),b(e.Name),a(2),x(" ",C(6,5,e.Amount)," "),a(3),b(e.PaymentName),a(2),b(e.Note)}}function tl(t,d){if(t&1){let e=I();i(0,"tr")(1,"td"),l(2),o(),i(3,"td")(4,"input",80),v("ngModelChange",function(r){let s=S(e),g=s.$implicit,L=s.$index,W=m(),se=m(3);return h(se.onChangeDenomQty(W,g,r,L))}),o()(),i(5,"td",46),l(6),p(7,"number"),o()()}if(t&2){let e=d.$implicit;a(2),b(e.PriceDisplay),a(2),c("ngModel",e.Quantity),a(2),x(" ",C(7,3,e.Quantity*e.Amount)," ")}}function il(t,d){if(t&1&&(i(0,"tr"),f(1,"td",96),i(2,"td")(3,"a",105),l(4),o()(),i(5,"td"),l(6),o(),i(7,"td"),l(8),p(9,"date"),o(),i(10,"td"),l(11),p(12,"IsMinDate"),o(),i(13,"td",46),l(14),o()()),t&2){let e=d.$implicit,n=d.$index;a(),c("innerHTML",n+1,w),a(2),c("routerLink",z(14,ti))("queryParams",T(15,bt,e.ID)),a(),x(" ",e.Number," "),a(2),b(e.CustomerName),a(2),b(y(9,8,e.Date,"dd MMM yyyy")),a(3),x(" ",y(12,11,e.Due,"dd MMM yyyy")," "),a(3),b(e.Payment)}}function nl(t,d){if(t&1&&(i(0,"tr"),f(1,"td",96),i(2,"td")(3,"a",106),l(4),o()(),i(5,"td"),l(6),o(),i(7,"td",46),l(8),p(9,"number"),o(),i(10,"td",46),l(11),p(12,"number"),o(),i(13,"td"),l(14),p(15,"date"),o()()),t&2){let e=d.$implicit,n=d.$index;a(),c("innerHTML",n+1,w),a(2),c("routerLink",z(15,ti))("queryParams",T(16,bt,e.InvoiceID)),a(),x(" ",e.Number," "),a(2),b(e.CustomerName),a(2),x(" ",C(9,8,e.Quantity)," "),a(3),x(" ",C(12,10,e.UnitPrice)," "),a(3),x(" ",y(15,12,e.Created,"dd MMM yyyy")," ")}}function ol(t,d){if(t&1&&(i(0,"tr")(1,"td"),l(2),o(),i(3,"td"),l(4),p(5,"date"),o(),i(6,"td")(7,"a",105),l(8),o()(),i(9,"td",46),l(10),p(11,"number"),o()()),t&2){let e=d.$implicit,n=d.$index;a(2),b(n+1),a(2),x(" ",y(5,6,e.Created,"dd MMM yyyy")," "),a(3),c("routerLink",z(11,ti))("queryParams",T(12,bt,e.InvoiceID)),a(),x(" ",e.InvoiceNumber," "),a(2),x(" ",C(11,9,e.Points*-1)," ")}}function al(t,d){if(t&1&&(i(0,"tr")(1,"th"),l(2),o(),i(3,"td",63),l(4,":"),o(),i(5,"td",46),l(6),p(7,"number"),o()()),t&2){let e=m();a(2),b(e.Label.Taxable),a(4),x(" ",C(7,2,e.Session.Taxable)," ")}}function rl(t,d){if(t&1&&(i(0,"tr")(1,"th"),l(2),o(),i(3,"td",63),l(4,":"),o(),i(5,"td",46),l(6),o()()),t&2){let e=m();a(2),b(e.Label.TaxEmapt),a(4),x(" ",e.Session.TaxExempt," ")}}function ll(t,d){if(t&1&&(i(0,"div",25),f(1,"POS-shift-detail-card",26),o(),i(2,"div",5),u(3,Lr,59,47,"section",27),i(4,"section",28)(5,"div",29)(6,"div",30)(7,"ul",31)(8,"li",32)(9,"a",33),l(10,"Invoice"),o()(),u(11,Ar,3,3,"li",32),u(12,Hr,3,0,"li",32),u(13,Wr,3,3,"li",32),u(14,$r,3,0,"li",32),u(15,jr,3,0,"li",32),i(16,"li",32)(17,"a",34),l(18,"Gross Sales History"),o()(),u(19,zr,3,0,"li",32),i(20,"li",32)(21,"a",35),l(22,"Z-Index"),o()()(),i(23,"div",36)(24,"div",37),u(25,Ur,28,6,"div",38)(26,Gr,7,0,"div",39),o(),i(27,"div",40)(28,"div",38)(29,"div",11)(30,"table",41)(31,"thead",42)(32,"tr",43)(33,"th",44),l(34," No "),o(),i(35,"th",45),l(36,"Number"),o(),i(37,"th",45),l(38,"Customer"),o(),k(39,Jr,2,1,"th",46,H),o()(),i(41,"tbody"),k(42,Xr,10,9,"tr",null,H),o(),i(44,"tfoot")(45,"tr")(46,"td",47)(47,"b"),l(48,"sum:"),o()(),k(49,Yr,4,7,"td",46,H),o()()()()()(),i(51,"div",48)(52,"div",38)(53,"div",11)(54,"table",41)(55,"thead",42)(56,"tr",43),u(57,Kr,3,0,"th",49),i(58,"th",50),l(59," Label "),o(),i(60,"th",51),l(61,"Amount"),o(),i(62,"th",45),l(63,"Payment"),o(),i(64,"th"),l(65,"Note"),o()()(),i(66,"tbody"),k(67,el,11,7,"tr",null,H),o()()()()(),i(69,"div",52)(70,"div",38)(71,"div",11)(72,"table",41)(73,"thead",42)(74,"tr",43)(75,"th",45),l(76,"Cash Denomination"),o(),i(77,"th",53),l(78," QTY "),o(),i(79,"th",54),l(80," Total "),o()()(),i(81,"tbody"),k(82,tl,8,5,"tr",null,li().tbDenom,!0),o(),i(84,"tfoot")(85,"tr")(86,"th",55),l(87,"Total:"),o(),i(88,"td",56),l(89),p(90,"async"),p(91,"number"),o()()()()()()(),i(92,"div",57)(93,"div",38)(94,"div",11)(95,"table",41)(96,"thead",42)(97,"tr",43)(98,"th",58),l(99," No "),o(),i(100,"th",45),l(101,"Number"),o(),i(102,"th",45),l(103,"Customer"),o(),i(104,"th",45),l(105,"Date"),o(),i(106,"th",45),l(107,"Due"),o(),i(108,"th"),l(109,"Payment"),o()()(),i(110,"tbody"),k(111,il,15,17,"tr",null,H),o()()()()(),i(113,"div",59)(114,"div",38)(115,"div",11)(116,"table",41)(117,"thead",42)(118,"tr",43)(119,"th",58),l(120," No "),o(),i(121,"th",45),l(122,"Number"),o(),i(123,"th",45),l(124,"Customer"),o(),i(125,"th",46),l(126,"Quantity"),o(),i(127,"th",51),l(128,"Price"),o(),i(129,"th"),l(130,"Date"),o()()(),i(131,"tbody"),k(132,nl,16,18,"tr",null,H),o(),i(134,"tfoot")(135,"tr")(136,"td",60),l(137,"Total"),o(),i(138,"td",46),l(139),p(140,"sum"),p(141,"number"),o(),i(142,"td",46),l(143),p(144,"sum"),p(145,"number"),o()()()()()()(),i(146,"div",61)(147,"div",38)(148,"div",11)(149,"table",62)(150,"tr",43)(151,"th"),l(152,"Z-Count"),o(),i(153,"td",63),l(154,":"),o(),i(155,"td",46),l(156),p(157,"number"),o()(),i(158,"tr")(159,"th"),l(160,"Current"),o(),i(161,"td",63),l(162,":"),o(),i(163,"td",46),l(164),p(165,"sum"),p(166,"number"),o()(),i(167,"tr")(168,"th"),l(169,"Previous"),o(),i(170,"td",63),l(171,":"),o(),i(172,"td",46),l(173),p(174,"number"),o()(),i(175,"tr")(176,"th"),l(177,"Accumulated"),o(),i(178,"td",63),l(179,":"),o(),i(180,"td",46),l(181),p(182,"sum"),p(183,"number"),o()()()()()(),i(184,"div",64)(185,"div",38)(186,"div",11)(187,"table",41)(188,"thead",42)(189,"tr",43)(190,"th",58),l(191," No "),o(),i(192,"th",45),l(193,"Date"),o(),i(194,"th",45),l(195,"Number"),o(),i(196,"th",46),l(197,"Point"),o()()(),i(198,"tbody"),k(199,ol,12,14,"tr",null,H),o()()()()(),i(201,"div",65)(202,"div",38)(203,"div",11)(204,"table",62)(205,"tr",43)(206,"th"),l(207,"Sales"),o(),i(208,"td",63),l(209,":"),o(),i(210,"td",46),l(211),p(212,"number"),o()(),i(213,"tr")(214,"th"),l(215),o(),i(216,"td",63),l(217,":"),o(),i(218,"td",46),l(219),p(220,"number"),o()(),i(221,"tr")(222,"th"),l(223,"Invoice Count"),o(),i(224,"td",63),l(225,":"),o(),i(226,"td",46),l(227),p(228,"number"),o()(),u(229,al,8,4,"tr"),u(230,rl,7,2,"tr"),i(231,"tr")(232,"th"),l(233,"Last Invoice"),o(),i(234,"td",63),l(235,":"),o(),i(236,"td",46),l(237),o()()()()()()()()()()()),t&2){let e=d,n=m(3);a(),c("Name",e.Session.UserName)("OutletName",e.Session.RegisterName)("Start",e.Session.Start)("End",e.Session.End)("Invoices",e.Invoices)("VoidInvoice",e.VoidInvoice)("Sales",e.Session.Sales)("Surcharge",e.Session.Surcharge)("Tax",e.Session.Tax)("StartDate",e.Session.Start)("EndDate",e.Session.End)("CurrencySymbol",e.Session.PrimaryCurrencySymbol)("totalSalesVisible",n.totalSalesVisible()),a(2),_(e.Payments.length>0?3:-1),a(6),$(T(76,Ci,e.InvoiceVisible)),a(2),_(e.Session!=null&&e.PaymentReceiveVisible?11:-1),a(),_(e.Session?12:-1),a(),_(e.Session?13:-1),a(),_(e.InvoiceVisible&&e.VoidInvoice.length>0?14:-1),a(),_(e.SalesReturn.length>0?15:-1),a(4),_(e.LoyaltyPointhistory.length>0?19:-1),a(5),$(Q(78,sn,e.InvoiceVisible,e.InvoiceVisible)),a(),_(e.Session!=null&&e.InvoiceVisible?25:26),a(2),c("ngClass",Q(81,sn,!e.InvoiceVisible&&e.PaymentReceiveVisible,!e.InvoiceVisible&&e.PaymentReceiveVisible)),a(12),B(e.PaymentMethods),a(3),B(e.PaymentReceived),a(7),B(e.PaymentMethods),a(8),_(e.InputMode?57:-1),a(10),B(e.Expenses),a(2),c("ngClass",Q(84,Dr,!e.InvoiceVisible&&!e.PaymentReceiveVisible,!e.InvoiceVisible&&!e.PaymentReceiveVisible)),a(13),B(e.Denominations),a(7),x(" ",C(91,44,C(90,42,n.totalDenom$))," "),a(22),B(e.VoidInvoice),a(21),B(e.SalesReturn),a(7),x(" ",C(141,49,y(140,46,e.SalesReturn,"Quantity"))," "),a(4),x(" ",C(145,54,y(144,51,e.SalesReturn,"UnitPrice"))," "),a(13),x(" ",C(157,56,e.Grosshistory)," "),a(8),x(" ",C(166,61,y(165,58,e.Invoices,"Final"))," "),a(9),x(" ",C(174,63,e.AccumulatedHistory)," "),a(8),x(" ",C(183,68,y(182,65,e.Invoices,"Final")+e.AccumulatedHistory)," "),a(18),B(e.LoyaltyPointhistory),a(12),x(" ",C(212,70,e.Session.Sales)," "),a(4),x(" ",e.Label.Tax?e.Label.Tax:"Tax"," "),a(4),x(" ",C(220,72,e.Session.Tax)," "),a(8),x(" ",C(228,74,e.Session.Invoice_Count)," "),a(2),_(e.Label.TaxDetailVisible?229:-1),a(),_(e.Label.TaxDetailVisible?230:-1),a(7),x(" ",e.Session.LastNumber," ")}}function dl(t,d){if(t&1&&(u(0,ll,238,87),p(1,"async")),t&2){let e,n=m(2);_((e=C(1,1,n.previewEOSForm$))?0:-1,e)}}function sl(t,d){if(t&1&&(i(0,"mainpanel-cmp",0)(1,"actions"),u(2,Tr,2,0,"button",1),p(3,"async"),u(4,wr,3,3,"button",2),p(5,"async"),o(),i(6,"content"),u(7,Fr,2,3),p(8,"async"),yi(9,dl,2,3),o()()),t&2){let e,n=m();c("pageData",d)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),_(C(3,6,n.isPreview$)?-1:2),a(2),_((e=C(5,8,n.previewEOSForm$))?4:-1,e),a(3),_(C(8,10,n.isPreview$)?9:7)}}var ei=class t extends Oi{constructor(e,n,r,s,g,L){super(L);this.http=e;this.matDialog=s;this.router=g;this.pageSetupService=L;this.isEdit$=Ye(n.snapshot.queryParams).pipe(me(W=>ee.IsNotEmpty(W.ID))),this.endOfShiftForm$=ai(this.menuData$.pipe(Ge(()=>Ye(n.snapshot.queryParams)),Ge(this.fetchEOSForm(this.endOfShiftFormEndpoint)),gt()),this.changeEOSForm$),this.registers$=this.endOfShiftForm$.pipe(me(W=>W.Options.Register)),this.cashiers$=this.endOfShiftForm$.pipe(me(W=>W.Options.Cashier)),this.eosForm$=this.endOfShiftForm$.pipe(Je(this.destroy$),me(W=>W.Form)),this.isEOSFormValid$=this.previewBtn$.pipe(ri(this.eosForm$),me(([,W])=>W),Et(W=>{let se=!0;return ee.IsEmpty(W.RegisterID)&&(r.info("Register is required.",oe.Info),se=!1),ee.IsEmpty(W.UserID)&&(r.info("Cashier is required.",oe.Info),se=!1),Ye(se)}),Ae(W=>W),Ke(1)),this.previewEOSForm$=ai(xi(this.eosForm$,this.isEOSFormValid$).pipe(Ke(1)).pipe(Ge(([W,,])=>this.http.post(this.previewEOSFormEndpoint,W)),Le(W=>{this.totalSalesVisible.set(W?.TotalSalesVisible)})),this.changePreview$).pipe(gt()),this.totalDenom$=this.previewEOSForm$.pipe(me(W=>W.Denominations),me(W=>{let se=0;return W.forEach(xt=>se+=xt.Amount*xt.Quantity),se})),this.isPreview$=this.previewEOSForm$.pipe(me(()=>!0),gi(!1),Ke(2))}http;matDialog;router;pageSetupService;endOfShiftFormEndpoint="/API/ShiftLoader/EndOfShiftForm";previewEOSFormEndpoint="/API/Shift/PreviewEndOfShiftForm";saveRegisterEndpoint="/API/Shift/SaveRegister";destroy$=new Be;isEdit$;endOfShiftForm$;fetchEOSForm=e=>n=>this.http.post(e,n);previewBtn=new Be;previewBtn$=this.previewBtn.asObservable().pipe(Je(this.destroy$));isPreview$;changeEOSForm=new Be;changeEOSForm$=this.changeEOSForm.asObservable().pipe(Je(this.destroy$));eosForm$;previewEOSForm$;changePreview=new Be;changePreview$=this.changePreview.asObservable().pipe(Je(this.destroy$));isEOSFormValid$;registers$;cashiers$;totalDenom$;totalSalesVisible=E(!0);ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onPreview(){this.previewBtn.next()}onChangeDate(e,n,r){let s=A(O({},e),{Form:A(O({},e.Form),{[r]:n})});this.changeEOSForm.next(s)}onChangeTime(e,n,r){let s=n.toTimeString().split(" ")[0].slice(0,5),g=A(O({},e),{Form:A(O({},e.Form),{[r]:s})});this.changeEOSForm.next(g)}changeRegCash(e,n,r){let s=A(O({},e),{Form:A(O({},e.Form),{[r]:n})});this.changeEOSForm.next(s)}onChangeStart(e,n,r){let s=A(O({},n),{Start:r});e.ExpectedPaymentVisible&&(s.Expected=s.Received+s.Start,s.ShortOver=s.Amount-s.Expected),s.Amount=s.Received+s.Start;let g=A(O({},e),{Payments:e.Payments.map(L=>L.Name==s.Name?s:L)});this.changePreview.next(g)}onChangeDifferences(e,n,r){let s=A(O({},n),{Amount:r});s.ShortOver=s.Amount-s.Expected;let g=A(O({},e),{Payments:e.Payments.map(L=>L.Name==s.Name?s:L)});this.changePreview.next(g)}tbPayments(e,n){return n.Name}tbDenom(e,n){return n.PriceDisplay}removeExpense(e,n){let r=[...e.Expenses];r.splice(n,1);let s=A(O({},e),{Expenses:r});this.changePreview.next(s)}openModalExpense(e,n,r){this.matDialog.open(Zt,{data:{expense:r,labels:e.LabelExpense,paymentMethods:e.PaymentList}}).afterClosed().pipe(Ae(s=>ee.IsNotEmpty(s))).subscribe(s=>{let g;s.action=="ADD"?g=[...e.Expenses,s.expense]:s.action=="EDIT"&&(g=e.Expenses.map((W,se)=>n==se?s.expense:W));let L=A(O({},e),{Expenses:g});this.changePreview.next(L)})}onChangeDenomQty(e,n,r,s){let g=A(O({},n),{Quantity:r}),L=A(O({},e),{Denominations:e.Denominations.map((W,se)=>se==s?g:W)});this.changePreview.next(L)}openCloseModal(e){this.matDialog.open(Kt,{data:{note:e.Session.Note,visitors:e.Session.Visitors}}).afterClosed().pipe(Ae(n=>n!=null),Le(n=>{let r=A(O({},e),{Session:A(O({},e.Session),{Note:n.note,Visitors:n.visitors})});this.changePreview.next(r)}),ri(this.previewEOSForm$),me(([,n])=>({Session:n.Session,Expenses:n.Expenses,Payments:n.Payments,Denominations:n.Denominations})),Ge(n=>this.http.post(this.saveRegisterEndpoint,n))).subscribe({next:n=>{this.router.navigate(["/menu/Shift/Main/Previous_Shift/Register_Shift_Detail"],{queryParams:{ID:n.ID}})}})}static \u0275fac=function(n){return new(n||t)(D(te),D(nt),D(X),D(_e),D(Tt),D(Ce))};static \u0275cmp=N({type:t,selectors:[["POS-register-shift-form-v2"]],standalone:!1,features:[G],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-success","ms-5"],[1,"btn","btn-outline-secondary",3,"click"],[1,"btn","btn-success","ms-5",3,"click"],[1,"container-fluid","mt-5"],[1,"row","justify-content-center"],[1,"col-12","col-md-6","col-lg-6"],[1,"card"],[1,"card-header","text-center"],[1,"fa-solid","fa-user"],[1,"card-body"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],[1,"fa-solid","fa-cash-register"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","readonly","items","ngModel"],[1,"fa-solid","fa-business-time"],[1,"row","gap-3","justify-content-center"],[1,"col"],[1,"row","gap-2","gap-lg-0","justify-content-center"],[1,"col-12","col-lg-4"],["appearance","outline",1,"mb-4",3,"dateChange","date","isFloatingLabel"],[1,"col-12","col-lg-2","position-relative","separator-line"],[3,"ngModelChange","ngModel","timeOnly"],[1,"d-block","d-md-none",2,"margin","0.5rem 12px","width","-webkit-fill-available"],[1,"col-12","col-lg-2"],[2,"padding-left","18px"],[3,"Name","OutletName","Start","End","Invoices","VoidInvoice","Sales","Surcharge","Tax","StartDate","EndDate","CurrencySymbol","totalSalesVisible"],["id","inp-payments"],["id","tab-shift"],[1,"row"],[1,"col-sm-12"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","invoice-tab","data-bs-toggle","tab","href","#invoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link","active"],["id","gross-tab","data-bs-toggle","tab","href","#gross","role","tab","aria-controls","gross","aria-selected","false",1,"nav-link"],["id","index-tab","data-bs-toggle","tab","href","#index","role","tab","aria-controls","index","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content"],["id","invoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0","show","active"],[1,"card","border-top-0"],[1,"row","g-0"],["id","received","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0",3,"ngClass"],[1,"table","table-bordered"],[1,"thead-light","sticky-top-thead","border-0"],[1,"border-0"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end"],[1,"text-end"],["colspan","3",1,"text-end"],["id","expense","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end",2,"width","50px"],[1,"border-end",2,"width","200px"],[1,"text-end","border-end"],["id","denom","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0",3,"ngClass"],[1,"border-end",2,"width","100px"],[1,"text-end",2,"width","300px"],["colspan","2",1,"text-end"],[1,"text-end","pe-8","fw-bold"],["id","void","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end",2,"width","20px"],["id","return","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["colspan","3"],["id","gross","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"table-sm","table-borderless"],[1,"sep"],["id","point","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["id","index","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"col-12"],[1,"card","w-100"],[1,"card-header","d-flex","align-items-end"],[1,"mb-0","me-2"],["matTooltipPosition","above",1,"text-body-secondary","fw-semibold","px-3","rounded","align-self-end",2,"border-radius","50rem",3,"matTooltip","ngClass"],[1,"table","table-bordered","border-light-gray"],[1,"table-light"],[1,"border-end","text-end","pe-10",2,"width","150px"],[1,"border-end","text-end","pe-10"],[1,"text-end","pe-10"],[1,"border-start","text-end","pe-10"],[1,"text-end","pe-10","fw-bold"],[2,"width","150px"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModelChange","ngModel","disabled"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModelChange","ngModel"],[1,"text-end","pe-10",3,"class"],["type","text",1,"form-control","text-end",3,"ngModelChange","ngModel"],["id","received-tab","data-bs-toggle","tab","href","#received","role","tab","aria-controls","received","aria-selected","false",1,"nav-link",3,"ngClass"],["id","expense-tab","data-bs-toggle","tab","href","#expense","role","tab","aria-controls","expense","aria-selected","false",1,"nav-link"],["id","denom-tab","data-bs-toggle","tab","href","#denom","role","tab","aria-controls","denom","aria-selected","false",1,"nav-link",3,"ngClass"],["id","void-tab","data-bs-toggle","tab","href","#void","role","tab","aria-controls","void","aria-selected","false",1,"nav-link"],["id","return-tab","data-bs-toggle","tab","href","#return","role","tab","aria-controls","return","aria-selected","false",1,"nav-link"],["id","point-tab","data-bs-toggle","tab","href","#point","role","tab","aria-controls","point","aria-selected","false",1,"nav-link"],[1,"border-end",2,"width","85px"],[1,"border-end",2,"width","30px"],[2,"width","60px"],["colspan","4"],[1,"text-end","fw-bold"],[1,"text-end",3,"innerHTML"],[1,"text-primary",3,"routerLink","queryParams","innerHTML"],[3,"innerHTML"],[1,"card","me-5","border-top-0"],[1,"d-flex","align-items-center","justify-content-center",2,"height","100px"],["target","_blank",3,"queryParams","routerLink"],["type","button","matTooltipPosition","above","matTooltip","Add Expense",1,"btn","btn-outline-dark","btn-sm","bg-white","text-black",3,"click"],["aria-hidden","true",1,"fa-solid","fa-plus"],[3,"click"],[1,"text-center"],[1,"fa","fa-xmark","fa-lg","text-danger",2,"cursor","pointer",3,"click"],["target","_blank",1,"text-primary",3,"routerLink","queryParams"],["target","_blank",3,"routerLink","queryParams"]],template:function(n,r){if(n&1&&(u(0,sl,10,12,"mainpanel-cmp",0),p(1,"async")),n&2){let s;_((s=C(1,1,r.menuData$))?0:-1,s)}},dependencies:[xe,ce,q,ae,Y,K,fe,le,we,$i,ue,Me,It,ie,U,De,Ot,Li,pe],styles:['.p-datepicker{min-height:48px;width:100%}.separator-line[_ngcontent-%COMP%]:after{content:"";width:2px;height:48px;display:block;background-color:#ccc;position:absolute;right:-2px;top:0;border-radius:4px}@media(max-width:576px){.separator-line[_ngcontent-%COMP%]:after{display:none}}@media(max-width:768px){.separator-line[_ngcontent-%COMP%]:after{display:none}}'],changeDetection:0})};var pl=()=>["/menu/Shift/Main/Previous_Shift/Register_Shift_Detail"],cl=t=>({ID:t}),ul=()=>["/print/shift-detail"],_l=t=>({id:t});function fl(t,d){if(t&1){let e=I();i(0,"a",14),v("click",function(){S(e);let r=m(2);return h(r.httpPostListID("Shift/EraseClosureHistory","Are you sure you want to erase selected record?"))}),f(1,"i",15),l(2,"Erase "),o()}}function Cl(t,d){if(t&1){let e=I();i(0,"div",16)(1,"h6"),l(2,"Outlet"),o(),i(3,"ng-select",17),V("ngModelChange",function(r){S(e);let s=m(2);return F(s.pageData().Filter.EntityID,r)||(s.pageData().Filter.EntityID=r),h(r)}),o(),i(4,"h6"),l(5,"From - To"),o(),i(6,"datepicker",18),V("dateChange",function(r){S(e);let s=m(2);return F(s.pageData().Filter.From,r)||(s.pageData().Filter.From=r),h(r)}),o(),i(7,"div",19)(8,"datepicker",20),V("dateChange",function(r){S(e);let s=m(2);return F(s.pageData().Filter.To,r)||(s.pageData().Filter.To=r),h(r)}),o()()()}if(t&2){let e,n=m(2);a(3),c("items",(e=n.pageData().Options)==null?null:e.Entities),P("ngModel",n.pageData().Filter.EntityID),a(3),c("isFloatingLabel",!1),P("date",n.pageData().Filter.From),a(2),c("isFloatingLabel",!1),P("date",n.pageData().Filter.To)}}function xl(t,d){if(t&1){let e=I();i(0,"th",8)(1,"input",21),v("change",function(r){S(e);let s=m(2);return h(s.onSelectAllData(r.target.checked))}),o()()}}function gl(t,d){if(t&1){let e=I();i(0,"td",8)(1,"input",25),V("ngModelChange",function(r){S(e);let s=m().$implicit;return F(s.selected,r)||(s.selected=r),h(r)}),o()()}if(t&2){let e=m().$implicit;a(),P("ngModel",e.selected)}}function Sl(t,d){if(t&1&&(i(0,"tr",11),u(1,gl,2,1,"td",8),i(2,"td")(3,"a"),l(4),o()(),i(5,"td")(6,"a",22),l(7),o()(),i(8,"td"),l(9),p(10,"date"),o(),i(11,"td"),l(12),p(13,"date"),o(),i(14,"td"),l(15),p(16,"number"),o(),i(17,"td"),l(18),p(19,"number"),o(),i(20,"td"),l(21),o(),i(22,"td"),l(23),o(),i(24,"td"),l(25),o(),i(26,"td")(27,"a",23),f(28,"i",24),o()()()),t&2){let e=d.$implicit,n=m(2);a(),_(n.roleService.order!=null&&n.roleService.order.Erase?1:-1),a(3),x(" ",e.LoginID," "),a(2),c("routerLink",z(24,pl))("queryParams",T(25,cl,e.ID)),a(),b(e.Number),a(2),b(y(10,14,e.Start,"dd MMM yyyy HH:mm")),a(3),b(y(13,17,e.End,"dd MMM yyyy HH:mm")),a(3),b(C(16,20,e.Sales+e.Tax)),a(3),b(C(19,22,e.Invoice_Count)),a(3),b(e.EntityName),a(2),b(e.Register),a(2),b(e.Visitors),a(2),c("routerLink",z(27,ul))("queryParams",T(28,_l,e.ID))}}function hl(t,d){if(t&1){let e=I();i(0,"mat-paginator",26),v("page",function(r){S(e);let s=m(2);return h(s.onPaginationChange(r))}),o()}if(t&2){let e=m(2);c("length",e.pagination.listTotal())("pageSize",e.pagination.pageSize())("pageIndex",e.pageData().Filter.PageNumber==0?0:e.pageData().Filter.PageNumber-1)}}function yl(t,d){if(t&1){let e=I();i(0,"mainpanel-cmp",2),V("textChange",function(r){S(e);let s=m();return F(s.pageData().Filter.Number,r)||(s.pageData().Filter.Number=r),h(r)}),v("onSubmit",function(){S(e);let r=m();return h(r.searchFromPageOne())}),V("filterChange",function(r){S(e);let s=m();return F(s.pageData().Filter,r)||(s.pageData().Filter=r),h(r)}),i(1,"actions"),u(2,fl,3,0,"a",3),o(),i(3,"filters"),tt(4,Cl,9,6,"ng-template",null,0,it),o(),i(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr"),u(12,xl,2,0,"th",8),i(13,"th",9),l(14,"Cashier"),o(),i(15,"th"),l(16,"Number"),o(),i(17,"th",10),l(18,"Open"),o(),i(19,"th",10),l(20,"Close"),o(),i(21,"th"),l(22,"Sales + Tax"),o(),i(23,"th"),l(24,"Invoices"),o(),i(25,"th"),l(26,"Outlet"),o(),i(27,"th"),l(28,"Register"),o(),i(29,"th"),l(30,"Visitors"),o(),f(31,"th",8),o()(),i(32,"tbody"),k(33,Sl,29,30,"tr",11,H),o()()()(),i(35,"div",12),u(36,hl,1,3,"mat-paginator",13),o()()()}if(t&2){let e=m();c("pageData",e.menuData()),P("text",e.pageData().Filter.Number),c("isFilterOnDropdown",!1),P("filter",e.pageData().Filter),a(2),_(e.getSelectedData().length>0?2:-1),a(10),_(e.roleService.order!=null&&e.roleService.order.Erase?12:-1),a(21),B(e.data().Data),a(3),_(e.pagination.listTotal()>0?36:-1)}}var ii=class t extends $e{roleService=j(Ie);matDialog=j(_e);constructor(d,e,n,r){super(d,e,"Shift/ClosureHistoryList","ShiftLoader/EndOFShift",r)}preGetList(){this.pageData.set(A(O({},this.pageData()),{Filter:A(O({},this.pageData().Filter),{Bin:!0})}))}openExportModal(){this.matDialog.open(ft,{data:{title:"Shift",exportTypes:[{ID:"ShiftExport/EndOFShiftList",Value:"Default"},{ID:"ShiftExport/ExportPreviousShift",Value:"Detail"}],filterExport:this.pageData().Filter,getAllDataLengthAPI:"",pagination:!0,selectedData:this.data().Data.map(d=>({Label:`${d.Number} - ${d.EntityName}`,Value:d.ID,GroupBy:"SHIFT"}))}})}static \u0275fac=function(e){return new(e||t)(D(Ce),D(te),D(ze),D(X))};static \u0275cmp=N({type:t,selectors:[["app-recycle-bin-shift"]],features:[G],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["matTooltip","Permanently download shift history",1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","14px"],[2,"width","120px"],[2,"width","140px"],[1,"border-bottom"],[1,"mt-2"],[3,"length","pageSize","pageIndex"],["matTooltip","Permanently download shift history",1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa-solid","fa-trash","me-3"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["type","checkbox",3,"change"],[1,"text-decoration-line-through",3,"routerLink","queryParams"],["target","_blank",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"page","length","pageSize","pageIndex"]],template:function(e,n){e&1&&u(0,yl,37,7,"mainpanel-cmp",1),e&2&&_(n.data()?0:-1)},dependencies:[ne,kt,xe,fe,Qe,q,at,wt,Y,K,Rt,Vt,we,ie,U],encapsulation:2,changeDetection:0})};var vl=t=>({ID:t});function bl(t,d){if(t&1){let e=I();i(0,"button",5),v("click",function(){S(e);let r=m(3);return h(r.openExportModal())}),f(1,"i",6),l(2," Export "),o()}}function El(t,d){if(t&1&&(i(0,"actions"),u(1,bl,3,0,"button",4),o()),t&2){let e=m(2);a(),_(e.roleService.global.Export?1:-1)}}function Dl(t,d){if(t&1){let e=I();i(0,"div",7)(1,"h6"),l(2,"Outlet"),o(),i(3,"outlet-selector",8),V("ngModelChange",function(r){S(e);let s=m(2);return F(s.pageData.Filter.OutletIds,r)||(s.pageData.Filter.OutletIds=r),h(r)}),o(),i(4,"h6"),l(5,"From - To"),o(),i(6,"datepicker",9),V("dateChange",function(r){S(e);let s=m(2);return F(s.pageData.Filter.From,r)||(s.pageData.Filter.From=r),h(r)}),o(),i(7,"div",10)(8,"datepicker",11),V("dateChange",function(r){S(e);let s=m(2);return F(s.pageData.Filter.To,r)||(s.pageData.Filter.To=r),h(r)}),o()()()}if(t&2){let e=m(2);a(3),c("accessType",2),P("ngModel",e.pageData.Filter.OutletIds),c("multiple",!0),a(3),c("isFloatingLabel",!1),P("date",e.pageData.Filter.From),a(2),c("isFloatingLabel",!1),P("date",e.pageData.Filter.To)}}function Ml(t,d){if(t&1&&(i(0,"tr",22)(1,"td"),l(2),o(),i(3,"td")(4,"a",25),l(5),o()(),i(6,"td"),l(7),o(),i(8,"td"),l(9),o(),i(10,"td"),l(11),o(),i(12,"td"),l(13),o(),i(14,"td"),l(15),o(),i(16,"td",26),l(17),p(18,"amountFraction"),o(),i(19,"td",27),l(20),o(),i(21,"td"),l(22),o()()),t&2){let e=d.$implicit;a(2),b(e.Cashier),a(2),c("routerLink","/menu/Shift/Main/Previous_Shift/Register_Shift_Detail")("queryParams",T(14,vl,e.ID)),a(),b(e.Number),a(2),b(e.Outlet),a(2),b(e.Register),a(2),b(e.Open),a(2),b(e.Close),a(2),b(e.Label),a(2),b(C(18,12,e.Amount)),a(3),b(e.Payment),a(2),b(e.Note)}}function Il(t,d){if(t&1){let e=I();i(0,"mat-paginator",28),v("page",function(r){S(e);let s=m(3);return h(s.onPaginationChange(r))}),o()}if(t&2){let e=m(3);c("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Tl(t,d){if(t&1&&(i(0,"div",12)(1,"div",13)(2,"table",14)(3,"thead",15)(4,"tr")(5,"th",16),l(6,"Cashier"),o(),i(7,"th",17),l(8,"Number"),o(),i(9,"th",18),l(10,"Outlet"),o(),i(11,"th",18),l(12,"Register"),o(),i(13,"th",17),l(14,"Open"),o(),i(15,"th",17),l(16,"Close"),o(),i(17,"th",19),l(18,"Label"),o(),i(19,"th",20),l(20,"Amount"),o(),i(21,"th",21),l(22,"Payment"),o(),i(23,"th"),l(24,"Note"),o()()(),i(25,"tbody"),k(26,Ml,23,16,"tr",22,H),o()()()(),i(28,"div",23),u(29,Il,1,3,"mat-paginator",24),o()),t&2){let e=m(2);a(26),B(e.data.Data),a(3),_(e.pagination.listTotal>0?29:-1)}}function wl(t,d){t&1&&f(0,"unauthorized-page",3)}function Pl(t,d){if(t&1){let e=I();i(0,"mainpanel-cmp",2),v("onSubmit",function(){S(e);let r=m();return h(r.searchFromPageOne())}),V("filterChange",function(r){S(e);let s=m();return F(s.pageData.Filter,r)||(s.pageData.Filter=r),h(r)}),u(1,El,2,1,"actions"),i(2,"filters"),tt(3,Dl,9,7,"ng-template",null,0,it),o(),i(5,"content"),u(6,Tl,30,1)(7,wl,1,0,"unauthorized-page",3),o()()}if(t&2){let e=m();c("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),P("filter",e.pageData.Filter),c("hideSearchDropdown",!(e.roleService.shift!=null&&e.roleService.shift.View)),a(),_(e.roleService.shift!=null&&e.roleService.shift.View?1:-1),a(5),_(e.roleService.shift!=null&&e.roleService.shift.View?6:7)}}var ni=class t extends ki{constructor(e,n,r,s){super(e,n,"Shift/GetRegistersExpenses","ShiftLoader/GetRegistersExpenses",s);this.httpService=n;this.csvConverter=r}httpService;csvConverter;roleService=j(Ie);matDialog=j(_e);exp=j(je);openExportModal(){this.matDialog.open(Nt,{data:{title:"Shift",exportTypes:[{ID:"ShiftExport/GetRegistersExpenses",Value:"Default"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"Shift/GetRegistersExpensesCount",pagination:!0}})}static \u0275fac=function(n){return new(n||t)(D(Ce),D(te),D(ze),D(X))};static \u0275cmp=N({type:t,selectors:[["POS-shift-expense"]],standalone:!1,features:[G],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","hideSearchDropdown"],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","hideSearchDropdown"],["roleMessage","Shift View Role"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[1,"container-fluid","mt-3"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","120px"],[2,"width","150px"],[2,"width","130px"],[2,"width","100px"],[1,"text-end",2,"width","120px"],[1,"text-center",2,"width","100px"],[1,"border-bottom"],[1,"mt-2"],[3,"length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-center"],[3,"page","length","pageSize","pageIndex"]],template:function(n,r){n&1&&u(0,Pl,8,7,"mainpanel-cmp",1),n&2&&_(r.data?0:-1)},dependencies:[xe,q,Y,K,Vt,we,Ct,Lt,pe],encapsulation:2})};var Fl=[{path:"Main/My_Shift",component:qt},{path:"Main/Active_Shift",component:Gt},{path:"Main/Previous_Shift",component:Jt},{path:"Main/Expense",component:ni},{path:"Main/Previous_Shift/Register_Shift_Detail",component:Yt},{path:"Main/Previous_Shift/Register_Shift_Form",component:ei},{path:"Recycle_Bin/Voided_Shift",component:ii},{path:"",redirectTo:"Main/My_Shift",pathMatch:"full"}],oi=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=et({type:t});static \u0275inj=Ze({imports:[Qe.forChild(Fl),Qe]})};var pn=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=et({type:t});static \u0275inj=Ze({imports:[kt,ne,de,oi,at,Ni,Rt,Pt,re,fe,we,Xt,ji,qi,Pi,Nt,Ft,Ri,Ct,Lt,Bt,We,Me,At,Gi,Fe,Ve,Re,Ne,Oe,ke]})};export{pn as ShiftModule};
@@ -1 +1 @@
1
- import{a as oe}from"./chunk-O3BU5I73.js";import"./chunk-ES6YUR3X.js";import{b as re}from"./chunk-LXLIHRSS.js";import"./chunk-Q2W7NEUH.js";import"./chunk-QITV5CIL.js";import"./chunk-2E5HYZMR.js";import"./chunk-2LD4VKHV.js";import{a as ae}from"./chunk-577WS6PH.js";import"./chunk-52U2QQ43.js";import"./chunk-3XYL5JLY.js";import{p as ne}from"./chunk-SCH7M36Q.js";import"./chunk-7TQOVQ3O.js";import"./chunk-G53IMHKY.js";import"./chunk-3EAA4CUP.js";import"./chunk-5U2B2SGN.js";import"./chunk-YJV74F2X.js";import"./chunk-WPCHBRKW.js";import"./chunk-PZSSTNYS.js";import"./chunk-YHZEJWGM.js";import{a as ie}from"./chunk-WHKDTNK2.js";import"./chunk-WM2CE23W.js";import{a as X}from"./chunk-SBDHBCD4.js";import"./chunk-YASD3VTU.js";import"./chunk-ONECCHQ5.js";import"./chunk-ROZU3QVN.js";import"./chunk-GKGUNK27.js";import{a as Q,f as $,g as ee}from"./chunk-OZY277ZB.js";import{d as te}from"./chunk-M43FFEY2.js";import"./chunk-5VC2XYC5.js";import"./chunk-BAIS4TWD.js";import"./chunk-XBINTEVI.js";import"./chunk-LN7LGRLI.js";import"./chunk-EP7SKSJT.js";import"./chunk-LAQZXTBX.js";import"./chunk-QSFZAHQ2.js";import"./chunk-TGQEO6S3.js";import"./chunk-ONKLHHM3.js";import"./chunk-X2OQT5MH.js";import"./chunk-XTOFMSDQ.js";import"./chunk-ZM456L6A.js";import"./chunk-F5JDPCBG.js";import"./chunk-AWENDKAA.js";import{a as Z}from"./chunk-AB35TLNF.js";import"./chunk-3DC26I3D.js";import"./chunk-UHM2XEMM.js";import"./chunk-UQSKGZO5.js";import"./chunk-4BITXMRY.js";import"./chunk-2AOZZW2I.js";import"./chunk-TM2I5PAG.js";import{a as z,b as K}from"./chunk-JXEPD3CF.js";import"./chunk-PPMQE2JW.js";import"./chunk-UI32X6QC.js";import"./chunk-OVCNCVGF.js";import{d as Y}from"./chunk-BUIP3UCE.js";import"./chunk-PWMMCY25.js";import"./chunk-OKQYRKDJ.js";import"./chunk-SIAVPMSP.js";import"./chunk-N5VS2V7L.js";import"./chunk-3V6FZIJD.js";import"./chunk-DEJ5V3PF.js";import"./chunk-T45W4CQR.js";import"./chunk-OK7LFGGQ.js";import"./chunk-VGLTFO5N.js";import"./chunk-UTSVZMZD.js";import"./chunk-BP6PECKT.js";import{a as b}from"./chunk-GNDUQZGK.js";import"./chunk-7KKUTTZ3.js";import"./chunk-ZS4XLRDB.js";import"./chunk-TYEI4SD2.js";import{a as q}from"./chunk-BKOMMH62.js";import"./chunk-7ESJNFN4.js";import"./chunk-JTDKDDTJ.js";import"./chunk-3TKWEWIY.js";import"./chunk-SXVOKLC4.js";import{F as J,h as U,p as G}from"./chunk-AJDQZ346.js";import"./chunk-TRJZVPIS.js";import"./chunk-YBESMONY.js";import"./chunk-YY6WVNU4.js";import"./chunk-PUBGTLD3.js";import"./chunk-PPTZHIIZ.js";import"./chunk-5U6KKKXF.js";import{n as H,q as j}from"./chunk-QGYXJUX3.js";import{$a as C,Ba as O,Bb as L,Cb as V,Db as l,Eb as a,Fb as r,Fc as P,Gb as h,Gc as F,Lc as N,Pb as D,Sb as T,Ua as s,Ub as c,Y as v,db as E,ea as B,hc as f,ib as W,jb as I,mc as u,nc as d,oa as x,oc as g,qd as R,ra as p,sa as m,wb as w,xd as A,yb as k,zb as M}from"./chunk-7D344CRC.js";import"./chunk-NF7PG5F2.js";function pe(o,S){if(o&1){let n=D();a(0,"button",5),T("click",function(){p(n);let e=c();return m(e.onPrint())}),h(1,"i",6),a(2,"span"),f(3,"Print"),r()()}}function me(o,S){if(o&1){let n=D();a(0,"div",7)(1,"h6"),f(2,"Outlet"),r(),a(3,"outlet-selector",8),g("ngModelChange",function(e){p(n);let i=c();return d(i.pageData().Filter.EntityID,e)||(i.pageData().Filter.EntityID=e),m(e)}),r(),a(4,"h6"),f(5,"Sales Order Tag"),r(),a(6,"ng-select",9),g("ngModelChange",function(e){p(n);let i=c();return d(i.pageData().Filter.SalesOrderTagID,e)||(i.pageData().Filter.SalesOrderTagID=e),m(e)}),r(),a(7,"h6"),f(8,"Print Mode"),r(),a(9,"div",10)(10,"radio-options",11),g("modelChange",function(e){p(n);let i=c();return d(i.pageData().Filter.OptionID,e)||(i.pageData().Filter.OptionID=e),m(e)}),r()(),a(11,"h6"),f(12," From "),h(13,"i",12),r(),a(14,"div",10)(15,"div",13)(16,"datepicker",14),g("dateChange",function(e){p(n);let i=c();return d(i.pageData().Filter.From,e)||(i.pageData().Filter.From=e),m(e)}),r()(),a(17,"div",13)(18,"app-timepicker",15),g("timeChange",function(e){p(n);let i=c();return d(i.pageData().Filter.StartTime,e)||(i.pageData().Filter.StartTime=e),m(e)}),r()()(),a(19,"h6"),f(20,"To"),r(),a(21,"div",10)(22,"div",13)(23,"datepicker",16),g("dateChange",function(e){p(n);let i=c();return d(i.pageData().Filter.To,e)||(i.pageData().Filter.To=e),m(e)}),r()(),a(24,"div",13)(25,"app-timepicker",15),g("timeChange",function(e){p(n);let i=c();return d(i.pageData().Filter.EndTime,e)||(i.pageData().Filter.EndTime=e),m(e)}),r()()()()}if(o&2){let n,t,e=c();s(3),l("accessType",2),u("ngModel",e.pageData().Filter.EntityID),s(3),l("items",(n=e.pageData())==null||n.Options==null?null:n.Options.SalesOrderTags),u("ngModel",e.pageData().Filter.SalesOrderTagID),s(4),u("model",e.pageData().Filter.OptionID),l("options",(t=e.pageData())==null||t.Options==null?null:t.Options.Print),s(6),l("isFloatingLabel",!1),u("date",e.pageData().Filter.From),l("hidelClearBtn",!0),s(2),u("time",e.pageData().Filter.StartTime),l("fullWidth",!0),s(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),u("date",e.pageData().Filter.To),s(2),u("time",e.pageData().Filter.EndTime),l("fullWidth",!0)}}function se(o,S){if(o&1&&(a(0,"div",17),h(1,"app-packing-slip-v2",18),r()),o&2){let n=S.$implicit,t=c();s(),l("receipt",n)("template",t==null?null:t.Template)("config",t==null?null:t.AppConfigJSON)("css",t==null?null:t.StylesSheet)}}function ce(o,S){o&1&&L(0,se,2,4,"div",17,M),o&2&&V(S.Data)}var le=class o extends X{constructor(n,t,e){super(n,t,"print/BulkOrderPackingSlipLoader","print/BulkOrderPackingSlipLoader",e,void 0,!0,"get","get");this.httpService=t;this.initPrintListener()}httpService;dialogFilter=x(Q);receipts$;printTemplates;invoiceIds=O([]);preInitList(){this.pageData().Filter.From=new Date,this.pageData().Filter.To=new Date,this.pageData().Filter.StartTime="00:00",this.pageData().Filter.EndTime="23:59"}onFilter(){this.receipts$=this.httpService.post(b.GetBulkPrintPackingSlip,this.pageData().Filter).pipe(B(n=>{n?.Data?.length==0?this.toastrService?.info("There are no transaction",q.Info):this.generatePrintTemplate(n.PrintTemplates),this.invoiceIds.set(n.Data.map(t=>t?.Invoice?.ID))}),v(1))}generatePrintTemplate(n=[]){this.printTemplates=new Map(n.map(t=>[t.ID,t]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.post(b.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(t){return new(t||o)(C(Z),C(j),C(H))};static \u0275cmp=E({type:o,selectors:[["POS-bulk-packing-slip"]],features:[W],decls:11,vars:11,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","hideSearchBox","text","filter","isFilterOnDropdown"],[1,"btn","btn-outline-secondary","me-3"],["filters",""],[1,"container-fluid","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Label","bindValue","Value","placeholder","Choose Sales Order Tag","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[3,"modelChange","model","options"],["matTooltip","Invoice or Outbound Date Range based on Print Mode selection","matTooltipPosition","above",1,"fa","fa-circle-info",2,"cursor","pointer"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],[1,"mb-6"],[3,"receipt","template","config","css"]],template:function(t,e){if(t&1){let i=D();a(0,"mainpanel-cmp",1),g("textChange",function(_){return p(i),d(e.pageData().Filter.Number,_)||(e.pageData().Filter.Number=_),m(_)}),T("onSubmit",function(){return e.onFilter()}),g("filterChange",function(_){return p(i),d(e.pageData().Filter,_)||(e.pageData().Filter=_),m(_)}),a(1,"actions"),w(2,pe,4,0,"button",2),P(3,"async"),r(),a(4,"div",3),I(5,me,26,16,"ng-template",null,0,N),r(),a(7,"content")(8,"div",4),w(9,ce,2,0),P(10,"async"),r()()()}if(t&2){let i,y;l("pageData",e.menuData())("hideSearchBox",!0),u("text",e.pageData().Filter.Number)("filter",e.pageData().Filter),l("isFilterOnDropdown",!1),s(2),k(((i=F(3,7,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),s(7),k((y=F(10,9,e.printTemplates&&e.receipts$))?9:-1,y)}},dependencies:[A,re,ee,$,ie,Y,ne,J,U,G,ae,te,oe,K,z,R],encapsulation:2})};export{le as BulkPackingSlipComponent};
1
+ import{a as oe}from"./chunk-O3BU5I73.js";import"./chunk-ES6YUR3X.js";import{b as re}from"./chunk-3AH7R62G.js";import"./chunk-Q2W7NEUH.js";import"./chunk-QITV5CIL.js";import"./chunk-2E5HYZMR.js";import"./chunk-2LD4VKHV.js";import{a as ae}from"./chunk-577WS6PH.js";import"./chunk-52U2QQ43.js";import"./chunk-3XYL5JLY.js";import{p as ne}from"./chunk-SCH7M36Q.js";import"./chunk-7TQOVQ3O.js";import"./chunk-G53IMHKY.js";import"./chunk-3EAA4CUP.js";import"./chunk-5U2B2SGN.js";import"./chunk-YJV74F2X.js";import"./chunk-WPCHBRKW.js";import"./chunk-PZSSTNYS.js";import"./chunk-YHZEJWGM.js";import{a as ie}from"./chunk-WHKDTNK2.js";import"./chunk-WM2CE23W.js";import{d as te}from"./chunk-M43FFEY2.js";import"./chunk-5VC2XYC5.js";import{a as X}from"./chunk-RWOSYWIC.js";import"./chunk-ROZU3QVN.js";import"./chunk-4J6MO575.js";import"./chunk-ONECCHQ5.js";import"./chunk-GKGUNK27.js";import"./chunk-XBINTEVI.js";import"./chunk-BAIS4TWD.js";import"./chunk-QSFZAHQ2.js";import"./chunk-TGQEO6S3.js";import"./chunk-ONKLHHM3.js";import"./chunk-X2OQT5MH.js";import"./chunk-XTOFMSDQ.js";import"./chunk-ZM456L6A.js";import"./chunk-F5JDPCBG.js";import"./chunk-LN7LGRLI.js";import"./chunk-EP7SKSJT.js";import"./chunk-LAQZXTBX.js";import{a as Q,f as $,g as ee}from"./chunk-FCP7EJWO.js";import"./chunk-2CBOQPZU.js";import{a as Z}from"./chunk-SE37IZHT.js";import"./chunk-3DC26I3D.js";import"./chunk-UHM2XEMM.js";import"./chunk-UQSKGZO5.js";import"./chunk-4BITXMRY.js";import"./chunk-2AOZZW2I.js";import"./chunk-TM2I5PAG.js";import{a as z,b as K}from"./chunk-JXEPD3CF.js";import"./chunk-PPMQE2JW.js";import"./chunk-UI32X6QC.js";import"./chunk-OVCNCVGF.js";import"./chunk-PWMMCY25.js";import"./chunk-OKQYRKDJ.js";import{d as Y}from"./chunk-BUIP3UCE.js";import"./chunk-SIAVPMSP.js";import"./chunk-N5VS2V7L.js";import"./chunk-3V6FZIJD.js";import"./chunk-DEJ5V3PF.js";import"./chunk-T45W4CQR.js";import"./chunk-OK7LFGGQ.js";import"./chunk-VGLTFO5N.js";import"./chunk-UTSVZMZD.js";import"./chunk-BP6PECKT.js";import{a as b}from"./chunk-GNDUQZGK.js";import"./chunk-7KKUTTZ3.js";import"./chunk-ZS4XLRDB.js";import"./chunk-TYEI4SD2.js";import{a as q}from"./chunk-BKOMMH62.js";import"./chunk-7ESJNFN4.js";import"./chunk-JTDKDDTJ.js";import"./chunk-3TKWEWIY.js";import"./chunk-SXVOKLC4.js";import{F as J,h as U,p as G}from"./chunk-AJDQZ346.js";import"./chunk-CW234Q5Q.js";import"./chunk-5NC22PJL.js";import"./chunk-YY6WVNU4.js";import"./chunk-H62QPUZY.js";import"./chunk-PPTZHIIZ.js";import"./chunk-OTNEWNB2.js";import{n as H,q as j}from"./chunk-QGYXJUX3.js";import{$a as C,Ba as O,Bb as L,Cb as V,Db as l,Eb as a,Fb as r,Fc as P,Gb as h,Gc as F,Lc as N,Pb as D,Sb as T,Ua as s,Ub as c,Y as v,db as E,ea as B,hc as f,ib as W,jb as I,mc as u,nc as d,oa as x,oc as g,qd as R,ra as p,sa as m,wb as w,xd as A,yb as k,zb as M}from"./chunk-7D344CRC.js";import"./chunk-NF7PG5F2.js";function pe(o,S){if(o&1){let n=D();a(0,"button",5),T("click",function(){p(n);let e=c();return m(e.onPrint())}),h(1,"i",6),a(2,"span"),f(3,"Print"),r()()}}function me(o,S){if(o&1){let n=D();a(0,"div",7)(1,"h6"),f(2,"Outlet"),r(),a(3,"outlet-selector",8),g("ngModelChange",function(e){p(n);let i=c();return d(i.pageData().Filter.EntityID,e)||(i.pageData().Filter.EntityID=e),m(e)}),r(),a(4,"h6"),f(5,"Sales Order Tag"),r(),a(6,"ng-select",9),g("ngModelChange",function(e){p(n);let i=c();return d(i.pageData().Filter.SalesOrderTagID,e)||(i.pageData().Filter.SalesOrderTagID=e),m(e)}),r(),a(7,"h6"),f(8,"Print Mode"),r(),a(9,"div",10)(10,"radio-options",11),g("modelChange",function(e){p(n);let i=c();return d(i.pageData().Filter.OptionID,e)||(i.pageData().Filter.OptionID=e),m(e)}),r()(),a(11,"h6"),f(12," From "),h(13,"i",12),r(),a(14,"div",10)(15,"div",13)(16,"datepicker",14),g("dateChange",function(e){p(n);let i=c();return d(i.pageData().Filter.From,e)||(i.pageData().Filter.From=e),m(e)}),r()(),a(17,"div",13)(18,"app-timepicker",15),g("timeChange",function(e){p(n);let i=c();return d(i.pageData().Filter.StartTime,e)||(i.pageData().Filter.StartTime=e),m(e)}),r()()(),a(19,"h6"),f(20,"To"),r(),a(21,"div",10)(22,"div",13)(23,"datepicker",16),g("dateChange",function(e){p(n);let i=c();return d(i.pageData().Filter.To,e)||(i.pageData().Filter.To=e),m(e)}),r()(),a(24,"div",13)(25,"app-timepicker",15),g("timeChange",function(e){p(n);let i=c();return d(i.pageData().Filter.EndTime,e)||(i.pageData().Filter.EndTime=e),m(e)}),r()()()()}if(o&2){let n,t,e=c();s(3),l("accessType",2),u("ngModel",e.pageData().Filter.EntityID),s(3),l("items",(n=e.pageData())==null||n.Options==null?null:n.Options.SalesOrderTags),u("ngModel",e.pageData().Filter.SalesOrderTagID),s(4),u("model",e.pageData().Filter.OptionID),l("options",(t=e.pageData())==null||t.Options==null?null:t.Options.Print),s(6),l("isFloatingLabel",!1),u("date",e.pageData().Filter.From),l("hidelClearBtn",!0),s(2),u("time",e.pageData().Filter.StartTime),l("fullWidth",!0),s(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),u("date",e.pageData().Filter.To),s(2),u("time",e.pageData().Filter.EndTime),l("fullWidth",!0)}}function se(o,S){if(o&1&&(a(0,"div",17),h(1,"app-packing-slip-v2",18),r()),o&2){let n=S.$implicit,t=c();s(),l("receipt",n)("template",t==null?null:t.Template)("config",t==null?null:t.AppConfigJSON)("css",t==null?null:t.StylesSheet)}}function ce(o,S){o&1&&L(0,se,2,4,"div",17,M),o&2&&V(S.Data)}var le=class o extends X{constructor(n,t,e){super(n,t,"print/BulkOrderPackingSlipLoader","print/BulkOrderPackingSlipLoader",e,void 0,!0,"get","get");this.httpService=t;this.initPrintListener()}httpService;dialogFilter=x(Q);receipts$;printTemplates;invoiceIds=O([]);preInitList(){this.pageData().Filter.From=new Date,this.pageData().Filter.To=new Date,this.pageData().Filter.StartTime="00:00",this.pageData().Filter.EndTime="23:59"}onFilter(){this.receipts$=this.httpService.post(b.GetBulkPrintPackingSlip,this.pageData().Filter).pipe(B(n=>{n?.Data?.length==0?this.toastrService?.info("There are no transaction",q.Info):this.generatePrintTemplate(n.PrintTemplates),this.invoiceIds.set(n.Data.map(t=>t?.Invoice?.ID))}),v(1))}generatePrintTemplate(n=[]){this.printTemplates=new Map(n.map(t=>[t.ID,t]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.post(b.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(t){return new(t||o)(C(Z),C(j),C(H))};static \u0275cmp=E({type:o,selectors:[["POS-bulk-packing-slip"]],features:[W],decls:11,vars:11,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","hideSearchBox","text","filter","isFilterOnDropdown"],[1,"btn","btn-outline-secondary","me-3"],["filters",""],[1,"container-fluid","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Label","bindValue","Value","placeholder","Choose Sales Order Tag","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[3,"modelChange","model","options"],["matTooltip","Invoice or Outbound Date Range based on Print Mode selection","matTooltipPosition","above",1,"fa","fa-circle-info",2,"cursor","pointer"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],[1,"mb-6"],[3,"receipt","template","config","css"]],template:function(t,e){if(t&1){let i=D();a(0,"mainpanel-cmp",1),g("textChange",function(_){return p(i),d(e.pageData().Filter.Number,_)||(e.pageData().Filter.Number=_),m(_)}),T("onSubmit",function(){return e.onFilter()}),g("filterChange",function(_){return p(i),d(e.pageData().Filter,_)||(e.pageData().Filter=_),m(_)}),a(1,"actions"),w(2,pe,4,0,"button",2),P(3,"async"),r(),a(4,"div",3),I(5,me,26,16,"ng-template",null,0,N),r(),a(7,"content")(8,"div",4),w(9,ce,2,0),P(10,"async"),r()()()}if(t&2){let i,y;l("pageData",e.menuData())("hideSearchBox",!0),u("text",e.pageData().Filter.Number)("filter",e.pageData().Filter),l("isFilterOnDropdown",!1),s(2),k(((i=F(3,7,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),s(7),k((y=F(10,9,e.printTemplates&&e.receipts$))?9:-1,y)}},dependencies:[A,re,ee,$,ie,Y,ne,J,U,G,ae,te,oe,K,z,R],encapsulation:2})};export{le as BulkPackingSlipComponent};