dealpos 25.41.2 → 25.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.
- package/browser/{chunk-CMQAUCAH.js → chunk-23PJKOTU.js} +1 -1
- package/browser/{chunk-G6C75N4Q.js → chunk-2OWHEMAL.js} +1 -1
- package/browser/{chunk-D3RDKDIY.js → chunk-2YDEXJE5.js} +1 -1
- package/browser/{chunk-HVMUCZ5I.js → chunk-2YMLZZTQ.js} +1 -1
- package/browser/{chunk-GGJKYPV4.js → chunk-3AW2HE63.js} +1 -1
- package/browser/{chunk-OI2RWAOV.js → chunk-3GOO5E5D.js} +1 -1
- package/browser/{chunk-3NJFM55L.js → chunk-3LBZDIW2.js} +1 -1
- package/browser/{chunk-6BL2JKZG.js → chunk-3YKVLHZG.js} +1 -1
- package/browser/{chunk-ATYFAKRP.js → chunk-42T2PR4J.js} +1 -1
- package/browser/{chunk-4SOJX57D.js → chunk-46DETXA6.js} +1 -1
- package/browser/{chunk-TNLZPCYK.js → chunk-4E2KYPJT.js} +1 -1
- package/browser/{chunk-JXJUXV43.js → chunk-4HEESH5A.js} +1 -1
- package/browser/chunk-4MOSTNVA.js +3 -0
- package/browser/{chunk-T6MTT57B.js → chunk-4QQTEPQT.js} +1 -1
- package/browser/{chunk-ZCQOFB7U.js → chunk-4SKJU2FQ.js} +1 -1
- package/browser/chunk-55U65HSD.js +1 -0
- package/browser/{chunk-UQKBA274.js → chunk-57Q3ENW2.js} +1 -1
- package/browser/{chunk-V3YO2TDM.js → chunk-5AJG5HDI.js} +1 -1
- package/browser/{chunk-YYR3XEAQ.js → chunk-5BE43QU3.js} +1 -1
- package/browser/{chunk-AKTKAREU.js → chunk-5BKBBN4I.js} +1 -1
- package/browser/chunk-5EJERM6E.js +1 -0
- package/browser/chunk-5EKTXVHQ.js +1 -0
- package/browser/{chunk-SSE7KV5S.js → chunk-5HJ6VGWE.js} +1 -1
- package/browser/{chunk-LKFDM7AC.js → chunk-5HX73JZ3.js} +1 -1
- package/browser/{chunk-OMVUFMMZ.js → chunk-5JJSLRVS.js} +1 -1
- package/browser/{chunk-I2O3VGCS.js → chunk-5M3JINH2.js} +1 -1
- package/browser/{chunk-4E2C3JC6.js → chunk-5MPRE3II.js} +1 -1
- package/browser/{chunk-BAORXMVG.js → chunk-5NDP4IKK.js} +1 -1
- package/browser/{chunk-ZIQAYIU4.js → chunk-5SEFV3QG.js} +1 -1
- package/browser/{chunk-MFIRFGE2.js → chunk-5VIFPZ5D.js} +1 -1
- package/browser/{chunk-UBMYMSUW.js → chunk-5Y67S5BV.js} +1 -1
- package/browser/{chunk-LDEAORXA.js → chunk-5ZIFEEGI.js} +1 -1
- package/browser/{chunk-IJ7U2UFN.js → chunk-6774R2EL.js} +1 -1
- package/browser/{chunk-W4BJ4JBG.js → chunk-6CAS42OB.js} +1 -1
- package/browser/{chunk-NW73SHIZ.js → chunk-6JAL37Y4.js} +1 -1
- package/browser/{chunk-YDXY6QHK.js → chunk-6OOS5QHG.js} +4 -4
- package/browser/{chunk-R7MOZHCP.js → chunk-6PGUQ3CR.js} +1 -1
- package/browser/{chunk-GHC4BCCW.js → chunk-6ZN7JR6K.js} +1 -1
- package/browser/chunk-7BNQDGUO.js +1 -0
- package/browser/{chunk-ZY3EJSWW.js → chunk-7ENDP7TZ.js} +1 -1
- package/browser/{chunk-G5HGRNM6.js → chunk-7IDMO3VZ.js} +1 -1
- package/browser/{chunk-T2PXIPKB.js → chunk-7QWJJPNG.js} +1 -1
- package/browser/{chunk-ZFNJGBST.js → chunk-7SC45GNA.js} +1 -1
- package/browser/{chunk-VYFU4BSG.js → chunk-7WKHBXTJ.js} +1 -1
- package/browser/chunk-7WNL4VON.js +1 -0
- package/browser/{chunk-FRO3O6SU.js → chunk-AAI6JWC5.js} +1 -1
- package/browser/{chunk-H54MTXKN.js → chunk-ADE4IPMV.js} +2 -2
- package/browser/{chunk-CHSEYRJF.js → chunk-AEHOR4RJ.js} +1 -1
- package/browser/{chunk-UKTKBEVE.js → chunk-AGTR6PKD.js} +1 -1
- package/browser/{chunk-6CLFZ6DE.js → chunk-APF7PDRI.js} +1 -1
- package/browser/{chunk-KMA5VOEA.js → chunk-AY5QZ3W6.js} +1 -1
- package/browser/{chunk-R5IO2SN4.js → chunk-AZO64X7U.js} +1 -1
- package/browser/{chunk-GVI4QM2F.js → chunk-B4HMFP42.js} +1 -1
- package/browser/{chunk-KVJTNXOJ.js → chunk-B5SDXVDR.js} +1 -1
- package/browser/{chunk-SOM7CDGS.js → chunk-B5VF422M.js} +1 -1
- package/browser/{chunk-LGCRFIIA.js → chunk-BEPFMRGE.js} +1 -1
- package/browser/{chunk-DPKYMDVN.js → chunk-BKUC3UED.js} +1 -1
- package/browser/chunk-BSIHS2EA.js +5 -0
- package/browser/{chunk-QGNOVY53.js → chunk-BXQFYW4R.js} +1 -1
- package/browser/{chunk-B56YVUVP.js → chunk-C2CGBWBH.js} +1 -1
- package/browser/{chunk-FBOZUHXS.js → chunk-C2KD7R6L.js} +1 -1
- package/browser/{chunk-7C4FPJKC.js → chunk-C6DVD3VG.js} +1 -1
- package/browser/{chunk-BYNEFOC3.js → chunk-CSQD5JSK.js} +1 -1
- package/browser/{chunk-4L5G4WC4.js → chunk-CWITQVZH.js} +1 -1
- package/browser/{chunk-65CKGM2C.js → chunk-D5K5VZVN.js} +1 -1
- package/browser/{chunk-WOZLNXGI.js → chunk-DAIHPIA2.js} +1 -1
- package/browser/{chunk-2F5STFEV.js → chunk-DLONNLPI.js} +1 -1
- package/browser/{chunk-IRAEKG7Q.js → chunk-ECOW7JD7.js} +1 -1
- package/browser/{chunk-OE7PM4Y4.js → chunk-EEEAUYZ6.js} +1 -1
- package/browser/{chunk-45BASVRZ.js → chunk-EFDAS2KA.js} +1 -1
- package/browser/{chunk-24OZA3GF.js → chunk-EGIDHMPA.js} +1 -1
- package/browser/{chunk-EYV7AZ42.js → chunk-EGQ2HW7A.js} +1 -1
- package/browser/{chunk-RZFAYPJW.js → chunk-EKKU5TMC.js} +1 -1
- package/browser/{chunk-VP42CBUF.js → chunk-ENTVT5C2.js} +1 -1
- package/browser/{chunk-7QDLYX4Z.js → chunk-ENVG4BZI.js} +1 -1
- package/browser/{chunk-FO3DCWRP.js → chunk-EWZ63XSS.js} +1 -1
- package/browser/{chunk-PPWXHE7X.js → chunk-F6Z777C5.js} +1 -1
- package/browser/chunk-FKDZ5OWB.js +297 -0
- package/browser/{chunk-3XMWVJ2L.js → chunk-FLCAZ4FS.js} +1 -1
- package/browser/{chunk-MZQRC3WK.js → chunk-FMHXEKSH.js} +1 -1
- package/browser/{chunk-GHLCUW72.js → chunk-FOWSNZZX.js} +1 -1
- package/browser/{chunk-7UFQPOGN.js → chunk-FP4HFB5J.js} +1 -1
- package/browser/{chunk-3VQLYVVB.js → chunk-GHA3WIJU.js} +1 -1
- package/browser/{chunk-FZNAOCWZ.js → chunk-GNAF5D23.js} +2 -2
- package/browser/{chunk-WEAIMPRM.js → chunk-H3ARLDNZ.js} +1 -1
- package/browser/{chunk-UERDXH3W.js → chunk-HFCVE2EL.js} +3 -3
- package/browser/{chunk-7KXMZBQB.js → chunk-HG3CFH36.js} +1 -1
- package/browser/{chunk-Z3OYXF5N.js → chunk-HIKFNCGX.js} +1 -1
- package/browser/{chunk-NHTMJTLV.js → chunk-HMER2IC5.js} +1 -1
- package/browser/{chunk-XJD4HFEN.js → chunk-HWEYOOFD.js} +1 -1
- package/browser/{chunk-XUVY2IO6.js → chunk-I3ZGST4N.js} +1 -1
- package/browser/{chunk-Z7LRKY4R.js → chunk-IC3DZAMU.js} +1 -1
- package/browser/{chunk-AFYPHUZX.js → chunk-IC7LV3SK.js} +1 -1
- package/browser/{chunk-IXEK3QVA.js → chunk-IQHU4MKW.js} +1 -1
- package/browser/{chunk-LID6CN6L.js → chunk-ITQF6HII.js} +1 -1
- package/browser/chunk-IW63ASKB.js +14 -0
- package/browser/{chunk-GZ2EJLH3.js → chunk-IYF464XX.js} +1 -1
- package/browser/{chunk-I45IV26L.js → chunk-JKLJ4KAW.js} +1 -1
- package/browser/{chunk-XOQ4SW2R.js → chunk-JOXTERIM.js} +1 -1
- package/browser/{chunk-GZAARWM2.js → chunk-JPXXXD26.js} +1 -1
- package/browser/{chunk-ILF7FISN.js → chunk-JUT3PXG2.js} +1 -1
- package/browser/{chunk-NQTQPZ6C.js → chunk-K7KRPIN7.js} +1 -1
- package/browser/{chunk-3MDUYQJU.js → chunk-KCZNKMQH.js} +1 -1
- package/browser/chunk-KGLFSTLG.js +1 -0
- package/browser/{chunk-KVCJJEYJ.js → chunk-KHILQH3P.js} +1 -1
- package/browser/chunk-KPXHDKIY.js +1 -0
- package/browser/{chunk-Y4MHZTLF.js → chunk-KTBBWEI2.js} +1 -1
- package/browser/{chunk-2LFFOWKW.js → chunk-KTCV3KOE.js} +1 -1
- package/browser/{chunk-OQCGVZVB.js → chunk-KZDE63UL.js} +1 -1
- package/browser/chunk-L7RHCBKX.js +1 -0
- package/browser/{chunk-2GQKEX5I.js → chunk-L7YSVT7G.js} +1 -1
- package/browser/{chunk-T2PMKO3M.js → chunk-LE3BKIDY.js} +1 -1
- package/browser/{chunk-HPLAMF75.js → chunk-LMJVRREP.js} +1 -1
- package/browser/{chunk-4CRQAT4Y.js → chunk-LO3FAFDO.js} +1 -1
- package/browser/{chunk-KS37A3HL.js → chunk-M3HHWYKD.js} +1 -1
- package/browser/{chunk-34DMF3QT.js → chunk-MCQ4J3UT.js} +3 -3
- package/browser/{chunk-3M5M2T4L.js → chunk-MFCXEITE.js} +1 -1
- package/browser/{chunk-5MZEP3D7.js → chunk-MGQ5I7BK.js} +1 -1
- package/browser/chunk-MH6ADXRE.js +1 -0
- package/browser/{chunk-3CCOX4FN.js → chunk-MPSML3FA.js} +1 -1
- package/browser/{chunk-X4LYU5XA.js → chunk-MQKEWZMW.js} +1 -1
- package/browser/{chunk-CN5SHMHF.js → chunk-MUJ6277G.js} +1 -1
- package/browser/{chunk-PJHIUSNN.js → chunk-N23TC7B4.js} +1 -1
- package/browser/{chunk-EPYFG6SH.js → chunk-N47VNTBG.js} +1 -1
- package/browser/{chunk-W2NHEKCW.js → chunk-N5UW2RHA.js} +1 -1
- package/browser/{chunk-DOTR5PYR.js → chunk-N6QITTR2.js} +1 -1
- package/browser/{chunk-DINWVJP7.js → chunk-NJS6IQX6.js} +1 -1
- package/browser/{chunk-ZBYQ3WOC.js → chunk-NMR7EZWC.js} +1 -1
- package/browser/{chunk-RP636SRQ.js → chunk-NPUWXK3K.js} +1 -1
- package/browser/{chunk-Z76AR3IW.js → chunk-NVWJ6HZD.js} +1 -1
- package/browser/{chunk-M7EO4UVO.js → chunk-O2QTP22K.js} +1 -1
- package/browser/chunk-O47TK53N.js +1 -0
- package/browser/chunk-OEARSIZR.js +1 -0
- package/browser/{chunk-D5LBI5TH.js → chunk-OIQL44PV.js} +1 -1
- package/browser/{chunk-ZEZ2K35X.js → chunk-OISKO6QJ.js} +1 -1
- package/browser/{chunk-3AIABMW2.js → chunk-OKIBXXRJ.js} +1 -1
- package/browser/chunk-OXQJYOVG.js +1 -0
- package/browser/{chunk-ZFYF7PEH.js → chunk-OYSMMJMB.js} +1 -1
- package/browser/{chunk-TLWH7QTW.js → chunk-OZ5JEMRA.js} +1 -1
- package/browser/{chunk-GMX2JWEW.js → chunk-PAXXDG73.js} +1 -1
- package/browser/{chunk-E4R5MW6J.js → chunk-PDJ7PMBB.js} +2 -2
- package/browser/chunk-PGWC5FQQ.js +1 -0
- package/browser/{chunk-OPCIBNIJ.js → chunk-PIYM2FOP.js} +1 -1
- package/browser/{chunk-NA7ZJQET.js → chunk-PVDNKSRC.js} +1 -1
- package/browser/{chunk-BADUP5JT.js → chunk-Q4CKRRGM.js} +1 -1
- package/browser/{chunk-UAI7BPPY.js → chunk-QHRP323Q.js} +1 -1
- package/browser/chunk-QMRUEU6Q.js +1 -0
- package/browser/{chunk-ISWF7KQF.js → chunk-QUHI6RHC.js} +1 -1
- package/browser/{chunk-BT6BH634.js → chunk-QYWAJKFK.js} +1 -1
- package/browser/{chunk-SDADDOK4.js → chunk-R3KCKK52.js} +1 -1
- package/browser/{chunk-5DDIIEIO.js → chunk-RDXTLLRW.js} +1 -1
- package/browser/{chunk-IXHBD564.js → chunk-RFAAXFT5.js} +1 -1
- package/browser/{chunk-K3367VWX.js → chunk-RIRZVGFR.js} +1 -1
- package/browser/{chunk-QHYHGORX.js → chunk-RK5QSVFP.js} +1 -1
- package/browser/{chunk-WIB47ZGF.js → chunk-ROQHG6JX.js} +1 -1
- package/browser/{chunk-QE22VQQ7.js → chunk-RTE36RZ4.js} +1 -1
- package/browser/{chunk-CB33ZMNF.js → chunk-RVXZOIFQ.js} +1 -1
- package/browser/{chunk-XZQMVGBQ.js → chunk-RX7JS4CO.js} +1 -1
- package/browser/{chunk-MYMQ5FSS.js → chunk-S4Z6ZYZ4.js} +1 -1
- package/browser/{chunk-GVSOBS5Q.js → chunk-SA6YKTKS.js} +4 -4
- package/browser/{chunk-WUDGY4TW.js → chunk-SEFALU4U.js} +1 -1
- package/browser/{chunk-XU5SOTZS.js → chunk-SIRUW7U2.js} +1 -1
- package/browser/chunk-STIS4QW6.js +1 -0
- package/browser/chunk-STUDNF4L.js +1 -0
- package/browser/{chunk-CSAGSFL3.js → chunk-SZPU2EUQ.js} +1 -1
- package/browser/{chunk-6CJCT6YT.js → chunk-T26KVRGE.js} +1 -1
- package/browser/{chunk-Y3CUYCSX.js → chunk-T2IJ4MCB.js} +1 -1
- package/browser/{chunk-WA5AGHFF.js → chunk-TBHZV7EF.js} +1 -1
- package/browser/{chunk-PZID6T4A.js → chunk-TFE7D7VV.js} +2 -2
- package/browser/{chunk-3CCLSY4U.js → chunk-TLXGEI76.js} +1 -1
- package/browser/{chunk-52NDCK4A.js → chunk-TSEZZNO5.js} +1 -1
- package/browser/{chunk-HV6ZFQAQ.js → chunk-TVEGYRXE.js} +1 -1
- package/browser/{chunk-JJK4XCMN.js → chunk-U4U76CXH.js} +1 -1
- package/browser/{chunk-ROG4PCGU.js → chunk-UBWKI2NL.js} +1 -1
- package/browser/{chunk-CIEDGY7H.js → chunk-UECAH6V7.js} +1 -1
- package/browser/{chunk-DNLMIUJF.js → chunk-UMT5IJRJ.js} +1 -1
- package/browser/{chunk-5PE5X2VB.js → chunk-UOWOBHQL.js} +1 -1
- package/browser/{chunk-7USMFPWJ.js → chunk-UU55EO4X.js} +1 -1
- package/browser/{chunk-OHZN3Z7O.js → chunk-UWGTJ4UH.js} +1 -1
- package/browser/{chunk-DJOHANFC.js → chunk-UXRO4UFY.js} +3 -3
- package/browser/{chunk-FBH7LG5C.js → chunk-UY6FY532.js} +1 -1
- package/browser/{chunk-N22LFPQL.js → chunk-VAMTYISE.js} +2 -2
- package/browser/{chunk-QCBXPOJL.js → chunk-VFTGIP5A.js} +1 -1
- package/browser/{chunk-BZHL4W7T.js → chunk-VGPJKK3G.js} +1 -1
- package/browser/{chunk-QMCAG2HX.js → chunk-VHAM2DWK.js} +1 -1
- package/browser/{chunk-SO3422SX.js → chunk-VIJ7B625.js} +1 -1
- package/browser/{chunk-B73NC3X2.js → chunk-W4UISTRM.js} +1 -1
- package/browser/{chunk-BAL3IIDS.js → chunk-W7I2T4SZ.js} +1 -1
- package/browser/{chunk-6IW4MVP2.js → chunk-WDQ4UKKY.js} +1 -1
- package/browser/{chunk-5TV4QYNO.js → chunk-WM2AITL6.js} +1 -1
- package/browser/{chunk-7S5F6JOF.js → chunk-WNVQWJ2T.js} +1 -1
- package/browser/{chunk-GOLWWX2Q.js → chunk-WO3LDDSF.js} +1 -1
- package/browser/{chunk-EPBMDUPY.js → chunk-WPFMJVWU.js} +1 -1
- package/browser/{chunk-M7G3WT32.js → chunk-WRBZW62O.js} +1 -1
- package/browser/{chunk-OFGVLEEZ.js → chunk-WTP4E6M5.js} +1 -1
- package/browser/{chunk-F4FAZ5ZL.js → chunk-X2WGP6SP.js} +1 -1
- package/browser/{chunk-3R5GV4J5.js → chunk-XA6BOS45.js} +1 -1
- package/browser/{chunk-QJWMNNK6.js → chunk-XHG7GWS5.js} +2 -2
- package/browser/{chunk-6IIF7CKF.js → chunk-XJ25XOBC.js} +2 -2
- package/browser/{chunk-I6E6PXQU.js → chunk-XKUQPHUA.js} +1 -1
- package/browser/{chunk-7LXPGNYF.js → chunk-XMYLHF4C.js} +1 -1
- package/browser/{chunk-HBC5DBVS.js → chunk-XO6RYTAS.js} +1 -1
- package/browser/chunk-XPZUZ5XJ.js +1 -0
- package/browser/{chunk-3GV7FUAX.js → chunk-XYB3YDKL.js} +1 -1
- package/browser/{chunk-UZFW2WNI.js → chunk-XYZNPGYI.js} +1 -1
- package/browser/{chunk-PRKAXHSJ.js → chunk-XZELBTQR.js} +1 -1
- package/browser/{chunk-NDM2ODJP.js → chunk-XZR3IMWZ.js} +1 -1
- package/browser/{chunk-QHX74QID.js → chunk-XZRKMN4V.js} +1 -1
- package/browser/{chunk-G7VSP6EW.js → chunk-XZWMENTO.js} +1 -1
- package/browser/{chunk-O3HYW3PV.js → chunk-YAWVVMMS.js} +1 -1
- package/browser/chunk-YEDKRNXU.js +1 -0
- package/browser/{chunk-HUMRIGHZ.js → chunk-YIKW3UR6.js} +1 -1
- package/browser/{chunk-J3C5CJEH.js → chunk-YN74XRON.js} +1 -1
- package/browser/{chunk-QWZ5AM3L.js → chunk-YNDNTAII.js} +1 -1
- package/browser/{chunk-SN3DTCGO.js → chunk-YPFMEFOD.js} +1 -1
- package/browser/{chunk-L2PLXSAS.js → chunk-YPOODN5H.js} +1 -1
- package/browser/chunk-YQL4ALTP.js +127 -0
- package/browser/{chunk-O5PHF6GW.js → chunk-YRGGDRUH.js} +1 -1
- package/browser/{chunk-NPTTEU4B.js → chunk-YWGXM2C3.js} +1 -1
- package/browser/{chunk-RWRT75NX.js → chunk-Z2LCSWV4.js} +1 -1
- package/browser/{chunk-UESUOHI6.js → chunk-Z56AQWHN.js} +1 -1
- package/browser/{chunk-REQUYIUO.js → chunk-ZHY3BUQJ.js} +1 -1
- package/browser/{chunk-KZTKYVZF.js → chunk-ZJ23VRN3.js} +1 -1
- package/browser/chunk-ZRCTLVL4.js +1 -0
- package/browser/{chunk-6BXO4MVU.js → chunk-ZSOLQ2F4.js} +1 -1
- package/browser/{chunk-N5QWMN2M.js → chunk-ZTHPT62A.js} +1 -1
- package/browser/chunk-ZWBEJM56.js +112 -0
- package/browser/{chunk-TYBAV5LT.js → chunk-ZZGSAFGO.js} +1 -1
- package/browser/index.html +3 -3
- package/browser/{main-6UNPCULN.js → main-SZ6HFSZZ.js} +2 -2
- package/browser/{styles-2TXD27TS.css → styles-EM6OTRT2.css} +1 -1
- package/package.json +1 -1
- package/browser/chunk-2EQ7Y56O.js +0 -5
- package/browser/chunk-2F5C3IAG.js +0 -1
- package/browser/chunk-4VMXYBU3.js +0 -3
- package/browser/chunk-6ZEEVCRE.js +0 -1
- package/browser/chunk-7E6SMB44.js +0 -1
- package/browser/chunk-AAR4B3HZ.js +0 -112
- package/browser/chunk-AD5C5J25.js +0 -1
- package/browser/chunk-DE2STA2G.js +0 -14
- package/browser/chunk-DWOLAWQN.js +0 -1
- package/browser/chunk-EZCQYLCW.js +0 -1
- package/browser/chunk-JY5XX3QX.js +0 -127
- package/browser/chunk-LOMNHHBV.js +0 -1
- package/browser/chunk-PQUVDF3D.js +0 -1
- package/browser/chunk-S4FLFLTR.js +0 -1
- package/browser/chunk-SQC25JWL.js +0 -1
- package/browser/chunk-TLANLIUC.js +0 -1
- package/browser/chunk-XHAPRGGF.js +0 -1
- package/browser/chunk-YQEL63SF.js +0 -1
- package/browser/chunk-ZC4V4XIM.js +0 -1
- package/browser/chunk-ZHDKGVTO.js +0 -1
- package/browser/chunk-ZKRFSVUW.js +0 -297
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as te}from"./chunk-
|
|
1
|
+
import{a as te}from"./chunk-3GOO5E5D.js";import{a as ie}from"./chunk-LE3BKIDY.js";import{ea as W,la as X,ma as x,na as Y,ua as ee}from"./chunk-EEEAUYZ6.js";import{$a as a,$b as V,Fa as w,Fc as Z,Ib as p,Jb as m,Kb as u,Lb as T,Mb as k,Mc as q,Ob as C,Qb as v,Rb as r,Sb as O,Tb as A,Wa as D,Wc as H,Yb as $,Zc as G,_b as E,bd as U,dc as R,ec as N,fc as Q,ja as M,jd as J,ka as S,kb as b,lb as B,na as F,ob as I,pc as K,qb as d,ua as L,ub as s,va as _,vb as c,wa as h,wb as j,xa as P,yb as z,za as g,zb as f}from"./chunk-UXRO4UFY.js";var ne=(()=>{class e extends te{pathId;ngOnInit(){this.pathId="url(#"+W()+")"}static \u0275fac=(()=>{let i;return function(n){return(i||(i=g(e)))(n||e)}})();static \u0275cmp=b({type:e,selectors:[["TimesCircleIcon"]],features:[I],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(t,n){t&1&&(P(),p(0,"svg",0)(1,"g"),u(2,"path",1),m(),p(3,"defs")(4,"clipPath",2),u(5,"rect",3),m()()()),t&2&&(f(n.getClassNames()),s("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),a(),s("clip-path",n.pathId),a(3),c("id",n.pathId))},encapsulation:2})}return e})();var ce=["removeicon"],ae=["*"];function le(e,l){if(e&1){let i=C();p(0,"img",4),v("error",function(n){_(i);let o=r();return h(o.imageError(n))}),m()}if(e&2){let i=r();c("src",i.image,D)("alt",i.alt)}}function se(e,l){if(e&1&&u(0,"span",6),e&2){let i=r(2);f(i.icon),c("ngClass","p-chip-icon"),s("data-pc-section","icon")}}function pe(e,l){if(e&1&&d(0,se,1,4,"span",5),e&2){let i=r();c("ngIf",i.icon)}}function me(e,l){if(e&1&&(p(0,"div",7),N(1),m()),e&2){let i=r();s("data-pc-section","label"),a(),Q(i.label)}}function _e(e,l){if(e&1){let i=C();p(0,"span",11),v("click",function(n){_(i);let o=r(3);return h(o.close(n))})("keydown",function(n){_(i);let o=r(3);return h(o.onKeydown(n))}),m()}if(e&2){let i=r(3);f(i.removeIcon),c("ngClass","p-chip-remove-icon"),s("data-pc-section","removeicon")("aria-label",i.removeAriaLabel)}}function he(e,l){if(e&1){let i=C();p(0,"TimesCircleIcon",12),v("click",function(n){_(i);let o=r(3);return h(o.close(n))})("keydown",function(n){_(i);let o=r(3);return h(o.onKeydown(n))}),m()}if(e&2){let i=r(3);f("p-chip-remove-icon"),s("data-pc-section","removeicon")("aria-label",i.removeAriaLabel)}}function de(e,l){if(e&1&&(T(0),d(1,_e,1,5,"span",9)(2,he,1,4,"TimesCircleIcon",10),k()),e&2){let i=r(2);a(),c("ngIf",i.removeIcon),a(),c("ngIf",!i.removeIcon)}}function fe(e,l){}function ge(e,l){e&1&&d(0,fe,0,0,"ng-template")}function ue(e,l){if(e&1){let i=C();p(0,"span",13),v("click",function(n){_(i);let o=r(2);return h(o.close(n))})("keydown",function(n){_(i);let o=r(2);return h(o.onKeydown(n))}),d(1,ge,1,0,null,14),m()}if(e&2){let i=r(2);s("data-pc-section","removeicon")("aria-label",i.removeAriaLabel),a(),c("ngTemplateOutlet",i.removeIconTemplate||i._removeIconTemplate)}}function Ce(e,l){if(e&1&&(T(0),d(1,de,3,2,"ng-container",3)(2,ue,2,3,"span",8),k()),e&2){let i=r();a(),c("ngIf",!i.removeIconTemplate&&!i._removeIconTemplate),a(),c("ngIf",i.removeIconTemplate||i._removeIconTemplate)}}var ve=({dt:e})=>`
|
|
2
2
|
.p-chip {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-ZZGSAFGO.js";var i=class{ID;Label;Groups;DiscountRate;SalesID;Point;PointUsed;Debt;DebtLimit;ExpiryDate;DueDays;DueMonths;PricebookID;TaxTypeId;NationalIDNumber;MemberIdentification;EntityID;EntityName;Email;Mobile;Name;LoyaltyEnabled;constructor(){this.Label="",this.Point=0,this.PointUsed=0,this.Debt=0,this.EntityID=t.GuidEmpty,this.DueMonths=0,this.DueDays=0,this.LoyaltyEnabled=!1}};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as kn}from"./chunk-YWGXM2C3.js";import{a as ct}from"./chunk-Z56AQWHN.js";import{a as Mn,e as En,f as On}from"./chunk-WM2AITL6.js";import{a as Tn}from"./chunk-TLXGEI76.js";import{a as Dn}from"./chunk-N5UW2RHA.js";import{a as wn}from"./chunk-NMR7EZWC.js";import{a as Pn}from"./chunk-YN74XRON.js";import"./chunk-7ENDP7TZ.js";import"./chunk-N23TC7B4.js";import"./chunk-L7RHCBKX.js";import{a as hn,b as xn}from"./chunk-SZPU2EUQ.js";import{a as yn}from"./chunk-6PGUQ3CR.js";import"./chunk-NQX7EX5A.js";import{a as Sn}from"./chunk-YIKW3UR6.js";import{a as In}from"./chunk-HBAQBI6Z.js";import{a as mn}from"./chunk-YXCPHYC5.js";import{a as gn,b as fn,c as Cn,d as nt,e as bn}from"./chunk-WPFMJVWU.js";import{c as vn,d as it}from"./chunk-5MPRE3II.js";import"./chunk-NJS6IQX6.js";import"./chunk-5M3JINH2.js";import{a as tt}from"./chunk-PF33HK6M.js";import"./chunk-4SKJU2FQ.js";import{b as dn}from"./chunk-XYZNPGYI.js";import{a as ot,b as rt,c as at}from"./chunk-BKUC3UED.js";import{a as pn,b as un}from"./chunk-OISKO6QJ.js";import"./chunk-AEHOR4RJ.js";import"./chunk-Z3E24JZW.js";import"./chunk-NQKVYQ6V.js";import{c as cn}from"./chunk-HT35KHLT.js";import{a as ln,b as sn}from"./chunk-DAIHPIA2.js";import"./chunk-AZO64X7U.js";import"./chunk-T26KVRGE.js";import{a as _n}from"./chunk-MPSML3FA.js";import"./chunk-IC3DZAMU.js";import"./chunk-YPFMEFOD.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-DLONNLPI.js";import"./chunk-YEDKRNXU.js";import"./chunk-T2IJ4MCB.js";import"./chunk-7QWJJPNG.js";import"./chunk-VHAM2DWK.js";import{f as an}from"./chunk-ADE4IPMV.js";import"./chunk-WDQ4UKKY.js";import{a as Kt,d as Yt,f as Xt,h as Zt}from"./chunk-MFCXEITE.js";import{a as ge,c as fe}from"./chunk-MUJ6277G.js";import"./chunk-RK5QSVFP.js";import{a as en,b as tn}from"./chunk-KGLFSTLG.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import{A as rn,q as Jt,u as Ae,v as Ve,w as Fe,x as nn,z as on}from"./chunk-EFDAS2KA.js";import{b as Ze,c as et}from"./chunk-JOXTERIM.js";import{O as j}from"./chunk-46DETXA6.js";import{d as Ne}from"./chunk-XYB3YDKL.js";import{a as F,b as U,e as Te,f as ke,g as oe}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-LE3BKIDY.js";import{a as xe}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as ie,G as we,a as Xe,c as te,h as J,l as Ee,o as ne,r as zt,s as Oe}from"./chunk-RVXZOIFQ.js";import"./chunk-OZ5JEMRA.js";import{a as Gt}from"./chunk-4E2KYPJT.js";import{a as g,d as de}from"./chunk-ZZGSAFGO.js";import"./chunk-YAWVVMMS.js";import{$a as l,$b as qt,Ac as _,Bc as Mt,D as kt,Db as Ie,E,Fa as A,Fc as le,I as Nt,Ib as r,Jb as a,Kb as D,Lb as y,M as At,Ma as V,Mb as h,Ob as N,Od as Ht,Pc as $,Q as Vt,Qb as d,Qd as Me,Rb as p,Rd as Je,S as Ft,Td as Ke,Ub as Pt,Va as Bt,Vd as Ye,W as Rt,Wa as He,Wc as Z,Y as Se,Yc as ue,Yd as K,Za as ze,Zb as Lt,Zc as H,_b as Wt,aa as Y,cd as Pe,d as wt,db as X,dc as G,ec as s,fa as T,fb as Ut,fc as B,gc as S,gd as ee,hc as he,ja as k,jc as Q,jd as O,k as Tt,kb as M,kc as L,lc as W,na as u,o as Dt,ob as jt,pc as De,qb as v,qc as Ge,rc as q,sc as $t,t as pe,va as f,vb as m,wa as C,wb as Qt,zc as b}from"./chunk-UXRO4UFY.js";import{a as R,b as It}from"./chunk-7DCB7DB2.js";var lt=class{AppConfigJSON;Currencies;SalesOrderTags;Entities;Payments;Taxes;SalesPOTypes;EstimateOptions;Data};var Re=class{CurrencyID;CustomerID;Date;Discount;DiscountAmount;EntityID;ID;Note;Number;SalesID;TaxTypeID;TypeID;constructor(){this.CustomerID=g.GuidEmpty,this.EntityID=g.GuidEmpty,this.ID=g.GuidEmpty,this.TaxTypeID=g.GuidEmpty,this.Discount=0,this.DiscountAmount=0,this.Date=new Date().toDateString()}};var re=class{Email;Key;Mobile;Name;Phone;Value;PricebookID};var st=class{ID;Index;Symbol;Name;ExchangeRate;ConversionSuggestion;ExchangeRateDate;ExchangeRateDateDisplay};var mt=class{ID;Name;DueDays;BlockDays;Description;PrintTemplateID;AccountID};var pt=class{DeliveryID;InvoiceID;InvoiceNumber;Message;OrderID;PaymentStateID;PaymentStateLabel;PrintMode;Success};var P=class o{estimateState=wn({loadForm:new lt,outlet:{Name:"",ID:g.GuidEmpty},order:new Re,cartItems:[],customer:new re,tax:new mn,currency:new st,tag:new mt,discount:{discountAmount:0,discount:0},state:0,complete:new pt});loadForm=this.estimateState.select(e=>Object.freeze(e.loadForm()));order=this.estimateState.select(e=>Object.freeze(e.order()));outlet=this.estimateState.select(e=>Object.freeze(e.outlet()));cartItems=this.estimateState.select(e=>Object.freeze(e.cartItems()));customer=this.estimateState.select(e=>Object.freeze(e.customer()));tax=this.estimateState.select(e=>Object.freeze(e.tax()));currency=this.estimateState.select(e=>Object.freeze(e.currency()));tag=this.estimateState.select(e=>Object.freeze(e.tag()));discount=this.estimateState.select(e=>Object.freeze(e.discount()));state=this.estimateState.select(e=>Object.freeze(e.state()));complete=this.estimateState.select(e=>Object.freeze(e.complete()));updateLoadForm(e){this.estimateState.update("loadForm",e)}updateOutlet(e){this.estimateState.update("outlet",e)}updateOrder(e){this.estimateState.update("order",e)}updateCartItems(e){this.estimateState.update("cartItems",e)}updateCustomer(e){this.estimateState.update("customer",e)}updateTax(e){this.estimateState.update("tax",e)}updateCurrency(e){this.estimateState.update("currency",e)}updateTag(e){this.estimateState.update("tag",e)}updateDiscount(e){this.estimateState.update("discount",e)}updateState(e){this.estimateState.update("state",e)}updateComplete(e){this.estimateState.update("complete",e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var Ce=class{ID;Name;Code;Cost;ThumbnailUrl;CouponDiscount;Discount;DiscountAmount;EntityID;Expense;InventoryTypeID;LoyaltyPoint;Note;PromotionGift;Quantity;UnitQuantity;SalesID;VariantID;VariantUnitQuantity;isMaxInventory;UOM;UOMName;UnitCost;UnitPrice;TypeID;Storage;Taxable;Price;Serial;PriceBookID;Variant;PriceTypeID;PriceNote;get Total(){return this.Price*(this.Quantity*this.UnitQuantity)*((100-this.Discount)/100)}get getItemAfterDiscount(){let e=this.getDiscPercentagePerItem();return this.DiscountAmount<e?e-this.DiscountAmount:0}getDiscPercentagePerItem(){let e=this.UnitPrice;return this.Discount>0&&(e=(100-this.Discount)/100*this.UnitPrice),e}};var be=class o{constructor(){}generateCartItem(e){let t=new Ce;return t.Name=e.Name,t.ThumbnailUrl=e.ThumbnailUrl,t.Price=e.UnitPrice,t.UnitPrice=e.UnitPrice,t.UnitCost=e.UnitCost,t.UnitQuantity=e.UnitQuantity,t.Quantity=1,t.Code=e.Code,t.TypeID=e.TypeID,t.Discount=e.PriceDiscount,t.VariantUnitQuantity=e.VariantUnitQuantity,t.Storage=e.Storage,t.UOM=e.UOM,t.UOMName=e.UOMName,t.VariantID=e.ID,t.Taxable=e.Taxable,t.InventoryTypeID=e.TypeID,t.PriceTypeID=e.PriceTypeID,t.PriceNote=e.PriceNote,t.Variant=e,t}generateCartItemOnEdit(e){let t=new Ce;return t.ID=e.ID,t.Name=e.Variant?.Name,t.ThumbnailUrl=e.Variant?.ThumbnailUrl,t.Price=e.Price,t.UnitPrice=e.Price,t.UnitCost=e.Cost,t.UnitQuantity=e.Variant?.UnitQuantity,t.Quantity=e.Quantity,t.Code=e.Variant?.Code,t.TypeID=e.Variant?.TypeID,t.Discount=e.Discount,t.VariantUnitQuantity=e.Variant?.VariantUnitQuantity,t.Storage=e.Variant?.Storage,t.UOM=e.Variant?.UOM,t.UOMName=e.Variant?.UOMName,t.VariantID=e.VariantID,t.Taxable=e.Taxable,t.Note=e.Note,t.Serial=e.Serial,t.InventoryTypeID=e.InventoryTypeID,t.PriceTypeID=e.PriceTypeID,t.Variant=e.Variant,t.PriceNote=e.PriceNote,t}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var je=class o{httpService=u(K);storeService=u(P);factoryService=u(be);activatedRoute=u(Ht);getLoadForm$=this.activatedRoute.queryParams.pipe(Y(e=>this.httpService.post("/API/estimate/LoadForm",e)),T(e=>this.storeService.updateLoadForm(e)),T(e=>{g.IsNotEmpty(e.Data)?this.onEditOrder(e):(this.initDefaultCurrency(),this.initTag(),this.initTax())}),F());constructor(){this.getLoadForm$.subscribe()}onEditOrder(e){let t=e.Data,n=this.findTaxById(t.Order.TaxTypeID),i=this.findCurrencyById(t.Order.CurrencyID),c=this.findOutletById(t.Order.EntityID),x=this.findTagById(t.Order.TypeID),I=this.getCartItemsOnEdit(e);this.storeService.updateState(1),this.storeService.updateOrder(t.Order),this.storeService.updateCartItems(I),this.storeService.updateCustomer({Key:t.Order.CustomerID,Value:t.ContactName}),this.storeService.updateTax(n),this.storeService.updateCurrency(i),this.storeService.updateOutlet(c),this.storeService.updateDiscount({discount:t.Order.Discount,discountAmount:t.Order.DiscountAmount}),this.storeService.updateTag(x)}getCartItemsOnEdit(e){return e.Data.Items.map(i=>this.factoryService.generateCartItemOnEdit(i))}initDefaultCurrency(){let e=this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID,t=this.storeService.loadForm()?.Currencies.find(n=>n.ID===e);this.storeService.updateCurrency(t)}initTag(){let e=this.storeService.loadForm()?.SalesOrderTags;this.storeService.updateTag(e[0])}initTax(){let e=this.storeService.loadForm()?.Taxes;this.storeService.updateTax(e[0])}findTaxById(e){return(this.storeService.loadForm()?.Taxes).find(i=>i.ID===e)}findCurrencyById(e){return(this.storeService.loadForm()?.Currencies).find(i=>i.ID===e)}findOutletById(e){return(this.storeService.loadForm()?.Entities).find(i=>i.ID===e)}findTagById(e){return(this.storeService.loadForm()?.SalesOrderTags).find(i=>i.ID===e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var Qe=class o{storeService=u(P);isOpenDialog$=U(this.storeService.loadForm).pipe(E(e=>g.IsNotEmpty(e.Entities)),pe(()=>{let e=!1,t=this.storeService.state(),n=this.storeService.outlet();return(t==0||t==1)&&(e=g.IsEmpty(n.ID)),e}));updateOutlet(e){this.storeService.updateOutlet(e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac,providedIn:"root"})};var se=class o{storeService=u(P);httpService=u(K);router=u(Me);orderNumber$=U(this.storeService.outlet).pipe(E(e=>g.IsNotEmpty(e.ID)),Y(e=>{if(this.storeService.state()==0)return this.httpService.post(j.EstimateGenerateNumber,{ID:e.ID}).pipe(pe(t=>t.Number));{let t=this.storeService.order().Number;return Dt(t)}}),T(e=>{this.storeService.state()==0&&this.updateOrderNumber(e)}),F());salesPersons$=U(this.storeService.outlet).pipe(Y(e=>g.IsNotEmpty(e.ID)?this.httpService.get(j.GetSalesPersonByOutletId,[{key:"ID",value:e.ID}]):Dt([])),Se(1));updateTagOrder$=U(this.storeService.tag).pipe(T(e=>{let t=R({},this.storeService.order());t.TypeID=e.ID,this.storeService.updateOrder(t)}),F());updateCurrencyOrder$=U(this.storeService.currency).pipe(T(e=>{let t=R({},this.storeService.order());t.CurrencyID=e.ID,this.storeService.updateOrder(t)}),F());updateTaxOrder$=U(this.storeService.tax).pipe(T(e=>{let t=R({},this.storeService.order());t.TaxTypeID=e.ID,this.storeService.updateOrder(t)}),F());updateDiscountOrder$=U(this.storeService.discount).pipe(T(e=>{let t=R({},this.storeService.order());t.Discount=e.discount,t.DiscountAmount=e.discountAmount,this.storeService.updateOrder(t)}),F());updateCustomerOrder$=U(this.storeService.customer).pipe(T(e=>{let t=R({},this.storeService.order());t.CustomerID=e.Key,this.storeService.updateOrder(t)}),F());updateEntityId$=U(this.storeService.outlet).pipe(E(e=>g.IsNotEmpty(e.ID)),T(e=>{let t=R({},this.storeService.order());t.EntityID=e.ID,this.storeService.updateOrder(t)}),F());constructor(){this.updateTagOrder$.subscribe(),this.updateCurrencyOrder$.subscribe(),this.updateTaxOrder$.subscribe(),this.updateDiscountOrder$.subscribe(),this.updateCustomerOrder$.subscribe(),this.updateEntityId$.subscribe()}newOrder(){let e=this.storeService.loadForm(),t=this.getDefaultCurrency(),n=this.storeService.outlet();this.storeService.updateOrder(new Re),this.storeService.updateCartItems([]),this.storeService.updateCustomer(new re),this.storeService.updateTax(R({},e.Taxes[0])),this.storeService.updateCurrency(R({},t)),this.storeService.updateTag(R({},e.SalesOrderTags[0])),this.storeService.updateDiscount({discountAmount:0,discount:0}),this.storeService.updateOutlet(R({},n)),this.router.navigate([],{queryParams:{}}),this.storeService.updateState(0)}getDefaultCurrency(){let e=this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID;return this.storeService.loadForm()?.Currencies.find(n=>n.ID===e)}updateOrderNumber(e){g.IsNotEmpty(e)&&this.storeService.order().Number!==e&&this.storeService.updateOrder(It(R({},this.storeService.order()),{Number:e}))}updateOrderDate(e){g.IsNotEmpty(e)&&this.storeService.order().Date!==e&&this.storeService.updateOrder(It(R({},this.storeService.order()),{Date:e}))}updateSalesPersonId(e){let t=R({},this.storeService.order());t.SalesID=e,this.storeService.updateOrder(t)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var Le=class o{storeService=u(P);httpService=u(K);quickkeys$=U(this.storeService.outlet).pipe(E(e=>g.IsNotEmpty(e.ID)),Vt((e,t)=>e.ID===t.ID),Y(e=>this.httpService.get(j.GetQuickKeyByEntityID,[{key:"ID",value:e.ID}])),Se(1));static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var Nn=o=>({"qtyBtn-disabled":o}),ut=class o{disabled=!1;decimalPlaces=4;max=1e15;min=-1e15;quantity;constructor(){}ngOnInit(){}incrementQty(){this.quantity<this.max&&(this.quantity++,this.onChange(this.quantity))}decrementQty(){this.quantity>this.min&&(this.quantity--,this.onChange(this.quantity))}quantityChange(){this.onChange(this.quantity)}onChange=e=>{};onTouched=()=>{};writeValue(e){g.IsEmpty(e)?this.quantity=0:this.quantity=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["POS-input-quantity"]],inputs:{disabled:"disabled",decimalPlaces:"decimalPlaces",max:"max",min:"min"},features:[De([{provide:Xe,multi:!0,useExisting:o}])],decls:6,vars:11,consts:[[1,"input-group"],["type","button","id","button-addon1",1,"btn","btn-outline-secondary","fw-bold","rounded-0","fs-2","border-end-0","py-4","qty-input","d-flex","align-items-center","qty_btn","justify-content-center",3,"click","ngClass","disabled"],["id","txtCartQuantity","type","text","autoNum","",1,"form-control","input-numpad","qty-input","text-center",3,"ngModelChange","ngModel","disabled","decimalPlaces"],["type","button","id","button-addon2",1,"btn","btn-outline-secondary","fw-bold","rounded-0","fs-5","border-start-0","py-4","qty-input","d-flex","align-items-center","qty_btn","justify-content-center",3,"click","ngClass","disabled"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"button",1),d("click",function(){return n.decrementQty()}),s(2,"-"),a(),r(3,"input",2),W("ngModelChange",function(c){return L(n.quantity,c)||(n.quantity=c),c}),d("ngModelChange",function(){return n.quantityChange()}),a(),r(4,"button",3),d("click",function(){return n.incrementQty()}),s(5,"+"),a()()),t&2&&(l(),m("ngClass",q(7,Nn,n.disabled))("disabled",n.disabled),l(2),Q("ngModel",n.quantity),m("disabled",n.disabled)("decimalPlaces",n.decimalPlaces),l(),m("ngClass",q(9,Nn,n.disabled))("disabled",n.disabled))},dependencies:[O,Z,ie,te,J,ne,ge,fe],styles:[".qtyBtn-disabled[_ngcontent-%COMP%]{background-color:#e9ecef;color:#000!important}button.qty_btn[_ngcontent-%COMP%]{background:#eee;border:1px solid #ddd;width:36px}.qty-input[_ngcontent-%COMP%]{height:36px!important}"]})};var ve=class o{storeService=u(P);autoApplyPricebook(e){let t=e?.Variant?.PriceBook?e?.Variant?.PriceBook:[],n=this.storeService.customer(),i=this.findCustomerPricebook(t,n),c=this.sortAppliedPricebooks(t,e.Quantity);return c.length>0||g.IsNotEmpty(i)?g.IsNotEmpty(i)?e=this.applyPricebook(e,i):e=this.applyPricebook(e,c[0]):e.PriceTypeID===2&&(e=this.removePricebook(e)),e}findCustomerPricebook(e=[],t){let n;return g.IsNotEmpty(t)&&g.IsNotEmpty(t?.Key)&&(n=e.find(i=>i.ID==t.PricebookID)),n}applyCustomerPricebook(){let e=[],t=this.storeService.customer(),n=this.storeService.cartItems();return g.IsNotEmpty(t.PricebookID)&&n.forEach(i=>{let c=this.findCustomerPricebook(i.Variant.PriceBook,t);c&&(i=this.applyPricebook(i,c),e.push(i))}),e}removeCustomerPricebook(e){let t=[];return this.storeService.cartItems().forEach(i=>{this.findCustomerPricebook(i.Variant.PriceBook,e)&&(i=this.removePricebook(i),t.push(i))}),t}sortAppliedPricebooks(e=[],t){return e.sort((n,i)=>i.MinimumQuantity-n.MinimumQuantity).filter(n=>t>=n.MinimumQuantity&&n.MinimumQuantity!=0)}applyPricebook(e,t){let n=this.storeService.loadForm()?.AppConfigJSON?.ModuleSell?.Pricebook?.PricebookVisible;return e.Discount=t.PriceDiscount,e.UnitPrice=t.UnitPrice,e.PriceBookID=t.ID,e.Price=t.UnitPrice,e.PriceTypeID=2,e.PriceNote=t.Name,n?e.Note=t.Name:e.Note="",e}removePricebook(e){return e.Discount=e.Variant.PriceDiscount,e.UnitPrice=e.Variant.UnitPrice,e.PriceBookID=null,e.Price=e.Variant.UnitPrice,e.PriceTypeID=0,e.Note="",e.PriceNote="",e}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var Ot=o=>({selected:o}),Un=()=>["/menu/Products/Catalog/Variants/Info"],jn=o=>({ID:o});function Qn(o,e){if(o&1){let t=N();y(0),r(1,"a",10),d("click",function(){f(t);let i=p();return C(i.tabState="PRODUCT")}),s(2," Product "),a(),h()}if(o&2){let t=p();l(),m("ngClass",q(1,Ot,t.tabState=="PRODUCT"))}}function Ln(o,e){if(o&1){let t=N();y(0),r(1,"a",11),d("click",function(){f(t);let i=p();return C(i.tabState="SERIAL")}),s(2," Serial "),a(),h()}if(o&2){let t=p();l(),m("ngClass",q(1,Ot,t.tabState=="SERIAL"))}}function Wn(o,e){if(o&1&&(y(0),r(1,"div",12)(2,"div",21),D(3,"POS-variant-autocomplete",22),a()(),h()),o&2){let t=p(2);l(3),m("formControl",t.variantSearchCtrl)}}function qn(o,e){if(o&1&&(r(0,"span"),s(1),a()),o&2){let t=p(2);l(),S("(",t.cartItem().UOMName,")")}}function $n(o,e){if(o&1){let t=N();r(0,"div",15)(1,"h6"),s(2,"Pricebook"),a(),r(3,"ng-select",23),W("ngModelChange",function(i){f(t);let c=p(2);return L(c.cartItem().PriceBookID,i)||(c.cartItem().PriceBookID=i),C(i)}),d("ngModelChange",function(i){f(t);let c=p(2);return C(c.onSelectPricebook(i))}),a()()}if(o&2){let t,n=p(2);l(3),m("items",(t=n.cartItem())==null||t.Variant==null?null:t.Variant.PriceBook),Q("ngModel",n.cartItem().PriceBookID)}}function Hn(o,e){if(o&1){let t=N();y(0),v(1,Wn,4,1,"ng-container",8),r(2,"div",12)(3,"div",13)(4,"h6"),s(5," Qty "),v(6,qn,2,1,"span",8),a(),r(7,"POS-input-quantity",14,0),W("ngModelChange",function(i){f(t);let c=p();return L(c.cartItem().Quantity,i)||(c.cartItem().Quantity=i),C(i)}),d("ngModelChange",function(){f(t);let i=p();return C(i.onQtyChange())}),a()(),r(9,"div",15)(10,"h6"),s(11,"Discount (%)"),a(),r(12,"input",16),W("ngModelChange",function(i){f(t);let c=p();return L(c.cartItem().Discount,i)||(c.cartItem().Discount=i),C(i)}),a()(),r(13,"div",15)(14,"h6"),s(15,"Price"),a(),r(16,"input",17,1),W("ngModelChange",function(i){f(t);let c=p();return L(c.cartItem().Price,i)||(c.cartItem().Price=i),C(i)}),a()(),v(18,$n,4,2,"div",15),a(),r(19,"div",18)(20,"div",19)(21,"POS-tinymce-editor",20),W("ngModelChange",function(i){f(t);let c=p();return L(c.cartItem().Note,i)||(c.cartItem().Note=i),C(i)}),a()()(),h()}if(o&2){let t,n=p();l(),m("ngIf",n.isEditState()==!1),l(5),m("ngIf",n.cartItem().UOMName),l(),Q("ngModel",n.cartItem().Quantity),m("decimalPlaces",n.isSerialItem()?0:4),l(5),Q("ngModel",n.cartItem().Discount),l(4),Q("ngModel",n.cartItem().Price),m("disabled",!(!(n.roleService==null||n.roleService.sell==null)&&n.roleService.sell.UnitPriceEditor)),l(2),Ie(((t=n.cartItem().Variant)==null||t.PriceBook==null?null:t.PriceBook.length)>0?18:-1),l(3),Q("ngModel",n.cartItem().Note)}}function zn(o,e){o&1&&(y(0),D(1,"i",42),r(2,"h6"),s(3,"No Image"),a(),h())}function Gn(o,e){if(o&1&&D(0,"img",43),o&2){let t=p(2);m("src",t.cartItem().ThumbnailUrl,He)}}function Jn(o,e){if(o&1&&(y(0),r(1,"tr")(2,"td",44),s(3),b(4,"number"),a(),r(5,"td",44),s(6),b(7,"number"),a(),r(8,"td",44),s(9),b(10,"number"),a()(),h()),o&2){let t=e.ngIf;l(3),S(" ",_(4,3,t==null?null:t.OnHand)," "),l(3),S(" ",_(7,5,t==null?null:t.Allocated)," "),l(3),S(" ",_(10,7,(t==null?null:t.OnHand)-(t==null?null:t.Allocated))," ")}}function Kn(o,e){if(o&1){let t=N();r(0,"tr")(1,"th",39),s(2,"Cost"),a(),r(3,"td",45)(4,"input",46),W("ngModelChange",function(i){f(t);let c=p(2);return L(c.cartItem().UnitCost,i)||(c.cartItem().UnitCost=i),C(i)}),a()()()}if(o&2){let t,n=p(2);l(4),Q("ngModel",n.cartItem().UnitCost),m("readonly",!(!((t=n.appConfig())==null||t.ModuleSell==null)&&t.ModuleSell.Cost.Enabled))}}function Yn(o,e){if(o&1&&(r(0,"tr")(1,"th",39),s(2,"Content"),a(),r(3,"td",40)(4,"div",47),s(5),b(6,"number"),a()()()),o&2){let t,n=p(2);l(5),he(" ",(t=n.cartItem())==null?null:t.VariantUnitQuantity," (@",_(6,2,n.cartItem().Price/((t=n.cartItem())==null?null:t.VariantUnitQuantity)),")")}}function Xn(o,e){if(o&1&&(r(0,"div",37)(1,"table",48)(2,"thead")(3,"tr")(4,"th",49),s(5,"Storage Location"),a()()(),r(6,"tbody")(7,"tr")(8,"td"),s(9),a()()()()()),o&2){let t=p(2);l(9),S(" ",t.cartItem().Storage," ")}}function Zn(o,e){if(o&1&&(y(0),r(1,"div",24)(2,"div",25)(3,"a",26),v(4,zn,4,0,"ng-container",27)(5,Gn,1,1,"ng-template",null,2,le),a()(),r(7,"div",28)(8,"div",29)(9,"div",19)(10,"div",30),D(11,"i",31),r(12,"div",32),s(13,"Inventory"),a()(),r(14,"table",33)(15,"thead")(16,"tr")(17,"th",34),s(18,"On Hand"),a(),r(19,"th",34),s(20,"Allocated"),a(),r(21,"th",35),s(22,"Available"),a()()(),r(23,"tbody"),v(24,Jn,11,9,"ng-container",8),b(25,"async"),a()()()(),r(26,"div",36)(27,"div",37)(28,"table",38)(29,"thead"),v(30,Kn,5,2,"tr",8),r(31,"tr")(32,"th",39),s(33,"Price"),a(),r(34,"td",40),s(35),b(36,"number"),a()(),v(37,Yn,7,4,"tr",8),a()()(),v(38,Xn,10,1,"div",41),a()()(),h()),o&2){let t,n,i,c,x,I,ae=G(6),ce=p();l(3),m("routerLink",Ge(13,Un))("queryParams",q(14,jn,(t=ce.cartItem())==null?null:t.ID)),l(),m("ngIf",((n=ce.cartItem())==null?null:n.ThumbnailUrl)==null)("ngIfElse",ae),l(20),m("ngIf",_(25,9,ce.variantInventory$)),l(6),m("ngIf",((i=ce.appConfig())==null||i.ModuleSell==null?null:i.ModuleSell.Cost.Visible)&&ce.roleService.product.Cost),l(5),S(" ",_(36,11,(c=ce.cartItem())==null?null:c.Price)," "),l(2),m("ngIf",((x=ce.cartItem())==null?null:x.VariantUnitQuantity)>1),l(),m("ngIf",((I=ce.appConfig())==null||I.ModuleSell==null||I.ModuleSell.Grid==null?null:I.ModuleSell.Grid.StorageVisible)&&((I=ce.cartItem())==null?null:I.Storage))}}function ei(o,e){if(o&1){let t=N();y(0),r(1,"app-item-serial",50),d("cartItemChange",function(i){f(t);let c=p();return C(c.onSerialChanges(i))}),a(),h()}if(o&2){let t=p();l(),m("entityId",t.storeService.outlet().ID)("cartItem",t.cartItem())}}var qe=class o{constructor(e,t){this.data=e;this.dialogRef=t;this.cartItem=V(e),this.initVariantInventory(),this.initIsSerialItem(),this.initModalConfig(),this.initDialogState()}storeService=u(P);cartItemService=u(me);roleService=u(de);toastr=u(Ye);pricebookService=u(ve);modalConfig=new Ae;tabState="CART";cartItem;appConfig=V(this.storeService.loadForm()?.AppConfigJSON);isSerialItem=V(!1);variantInventory$;isEditState=V(!1);showProductTab=V(!1);variantSearchCtrl=new Ee;getItemFromSearch$=this.variantSearchCtrl.valueChanges.pipe(E(e=>g.IsNotEmpty(e)),Y(e=>{if(e.type==="ID")return this.cartItemService.getItemByVariantId(e.str);if(e.type==="Code")return this.cartItemService.getItemByVariantByCode(e.str)}),T(e=>{this.cartItem.set(e),this.initModalTitle(),this.initProductTab(),this.initIsSerialItem(),this.initVariantInventory()}),F());ngOnInit(){this.isEditState()||this.getItemFromSearch$.subscribe()}initDialogState(){this.isEditState.set(g.IsNotEmpty(this.cartItem().VariantID)),this.initProductTab()}initVariantInventory(){this.variantInventory$=this.cartItemService.getVariantInventory(this.cartItem().VariantID).pipe(Se(1))}initProductTab(){this.showProductTab.set(g.IsNotEmpty(this.cartItem().VariantID))}initIsSerialItem(){this.isSerialItem.set(this.cartItem().TypeID==4)}initModalConfig(){this.initModalTitle(),this.modalConfig.customWidth="680px",this.modalConfig.noPadding=!0,this.modalConfig.bodyScrollable=!0}initModalTitle(){this.modalConfig.title=this.cartItem()?.Name??"Add Variant"}onSerialChanges(e){this.cartItem.set(e)}onQtyChange(){let e=this.pricebookService.autoApplyPricebook(this.cartItem());this.cartItem.set(e)}onSelectPricebook(e){let t;if(g.IsNotEmpty(e)){let i=this.cartItem().Variant.PriceBook.find(c=>c.ID===e);t=this.pricebookService.applyPricebook(this.cartItem(),i)}else t=this.pricebookService.removePricebook(this.cartItem());this.cartItem.set(t)}onCancel(){this.dialogRef.close()}onSave(){g.IsNotEmpty(this.cartItem().VariantID)&&g.IsNotEmpty(this.cartItem().Name)?this.dialogRef.close(this.cartItem()):this.toastr.warning("Please select a product","Warning")}static \u0275fac=function(t){return new(t||o)(X(ke),X(Te))};static \u0275cmp=M({type:o,selectors:[["app-dialog-item"]],decls:13,vars:9,consts:[["quantity",""],["price",""],["SHOW_IMAGE",""],[3,"onOk","onCancel","onClose","config"],[1,"mb-5"],[1,"container","w-100","h-100","mt-8"],[1,"row","border-bottom","mx-5"],["data-cy","input_sell",1,"btn","btn-link",3,"click","ngClass"],[4,"ngIf"],[1,"mx-8"],["data-cy","product",1,"btn","btn-link",3,"click","ngClass"],["data-cy","serial",1,"btn","btn-link",3,"click","ngClass"],[1,"row","mt-8"],[1,"col-auto","pe-0",2,"width","145px"],[3,"ngModelChange","ngModel","decimalPlaces"],[1,"col-auto","pe-0"],["type","text","percentage","","autoNum","",1,"form-control","input-cart",2,"width","100px",3,"ngModelChange","ngModel"],["id","inputPrice","type","text","autoNum","",1,"form-control","input-cart",2,"width","112px",3,"ngModelChange","ngModel","disabled"],[1,"row","my-6"],[1,"col-12"],["height","220px",3,"ngModelChange","ngModel"],[1,"col-12","px-0"],[3,"formControl"],["bindLabel","Name","bindValue","ID","placeholder","Pricebook","appendTo","body",2,"width","170px",3,"ngModelChange","items","ngModel"],[1,"row","my-8"],[1,"col-sm-4","d-flex","justify-content-center","flex-column","align-items-center","text-body-secondary"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],[1,"col-sm-8","inventory"],[1,"row","mb-8"],[1,"d-flex"],["aria-hidden","true",1,"fa-archive","fa-solid","fa-1x","pt-3","pe-2"],[2,"font-size","15px","font-family","'Roboto Slab'"],[1,"table","table-bordered","text-center","inventory-table"],[1,"table-light","py-6","border-end",2,"text-transform","none"],[1,"table-light","py-6",2,"text-transform","none"],[1,"row"],[1,"col-6"],[1,"table","table-bordered",2,"width","171px"],[1,"table-light",2,"text-transform","none"],[1,"pe-6","text-end"],["class","col-6",4,"ngIf"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],[1,"py-6"],[1,"p-0"],["type","text","autoNum","",1,"form-control","border-0","bg-white","text-end",3,"ngModelChange","ngModel","readonly"],["ngClass","ms-3"],[1,"table","table-bordered","text-center"],[1,"table-light"],[3,"cartItemChange","entityId","cartItem"]],template:function(t,n){t&1&&(r(0,"modal-material",3),d("onOk",function(){return n.onSave()})("onCancel",function(){return n.onCancel()})("onClose",function(){return n.onCancel()}),r(1,"content",4)(2,"div",5)(3,"div",6)(4,"div")(5,"a",7),d("click",function(){return n.tabState="CART"}),s(6," Cart "),a(),v(7,Qn,3,3,"ng-container",8)(8,Ln,3,3,"ng-container",8),a()(),r(9,"div",9),v(10,Hn,22,9,"ng-container",8)(11,Zn,39,16,"ng-container",8)(12,ei,2,2,"ng-container",8),a()()()()),t&2&&(m("config",n.modalConfig),l(5),m("ngClass",q(7,Ot,n.tabState=="CART")),l(2),m("ngIf",n.showProductTab()),l(),m("ngIf",n.isSerialItem()),l(2),m("ngIf",n.tabState=="CART"),l(),m("ngIf",n.tabState=="PRODUCT"),l(),m("ngIf",n.tabState=="SERIAL"))},dependencies:[O,Z,H,Pe,ee,Fe,Ve,yn,ie,te,J,ne,ge,fe,un,pn,Ke,Je,ct,we,Oe,xn,hn,ut,Ne],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.inventory-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}.input-cart[_ngcontent-%COMP%]{height:36px!important}"]})};var me=class o{httpService=u(K);storeService=u(P);factoryService=u(be);pricebookService=u(ve);dialog=u(oe);variantSearchCtrl=new Ee;viewContainerRef=u(Ut);selectedCustomer;cartItemEvent=new wt;onEditCartItems$=U(this.storeService.cartItems).pipe(E(()=>this.storeService.state()==1),pe(e=>({action:"INIT",items:e})),Ft());applyCustomerPricebook$=U(this.storeService.customer).pipe(T(e=>{this.onApplyCustomerPricebook(e)}),F());cartItems$=kt(this.onEditCartItems$,this.cartItemEvent.asObservable()).pipe(Rt((e,t)=>{let n=[];switch(t.action){case"INIT":n=t.items;break;case"ADD":n=this.addNewItem(e,t);break;case"UPDATE":n=this.updateItems(e,t);break;case"REMOVE":n=e.filter((i,c)=>t.index!==c);break;case"CLEAR":n=[];break;case"PURCHASE":n=this.updateItems(e,t);break;case"RETURN":n=this.updateItems(e,t);break;case"DROP":n=t.items;break}return this.storeService.updateCartItems(n),n},this.storeService.cartItems()));addCartItemBySearch$=this.variantSearchCtrl.valueChanges.pipe(E(e=>g.IsNotEmpty(e)),T(e=>{e.type==="ID"?this.addItemByVariantId(e.str):e.type==="Code"&&this.addItemByVariantCode(e.str)}),F());constructor(){this.addCartItemBySearch$.subscribe(),this.applyCustomerPricebook$.subscribe()}onApplyCustomerPricebook(e){let t=[],n=this.storeService.cartItems();g.IsNotEmpty(e.PricebookID)?(this.selectedCustomer=e,t=this.pricebookService.applyCustomerPricebook()):g.IsNotEmpty(this.selectedCustomer)&&(t=this.pricebookService.removeCustomerPricebook(this.selectedCustomer),this.selectedCustomer=null),n.forEach((i,c)=>{let x=t.find(I=>I.VariantID===i.VariantID);x&&this.updateCartItem({cartItem:x,index:c})})}onApplyPricebook(e){return this.pricebookService.autoApplyPricebook(e)}onOpenAddDialog(){this.dialog.open(qe,{data:new Ce,viewContainerRef:this.viewContainerRef}).afterClosed().pipe(E(e=>g.IsNotEmpty(e))).subscribe(e=>{this.cartItemEvent.next({item:e,action:"ADD",newRow:!0})})}onOpenEditDialog(e){this.dialog.open(qe,{data:R({},e.cartItem),viewContainerRef:this.viewContainerRef}).afterClosed().pipe(E(t=>g.IsNotEmpty(t))).subscribe(t=>{this.cartItemEvent.next({item:t,action:"UPDATE",index:e.index})})}onSelectQuickkeyItem(e){this.addItemByVariantId(e)}addNewItem(e,t){let n=[],i=e.find(c=>c.VariantID===t.item?.VariantID);return i?t.newRow?(t.item=this.onApplyPricebook(t.item),n=[...e,t.item]):(i.Quantity+=1,i=this.onApplyPricebook(i),n=[...e]):(t.item=this.onApplyPricebook(t.item),n=[...e,t.item]),n}updateItems(e,t){return e.map((i,c)=>c===t.index?cn(Ce,t.item):i)}onDropItems(e){this.cartItemEvent.next({action:"DROP",items:e})}addItemByVariantId(e){this.getItemByVariantId(e).pipe(T(t=>{this.cartItemEvent.next({item:t,action:"ADD",newRow:!1})})).subscribe()}addItemByVariantCode(e){this.getItemByVariantByCode(e).pipe(T(t=>{this.cartItemEvent.next({item:t,action:"ADD",newRow:!1})})).subscribe()}removeCartItem(e){this.cartItemEvent.next({action:"REMOVE",index:e.index})}updateCartItem(e){this.cartItemEvent.next({action:"UPDATE",item:e.cartItem,index:e.index})}clearCart(){this.dialog.open(Tn,{data:{title:"Clear Order Items",message:'<p class="h4">Are you sure you want to clear all order items?</p>',headerType:xe.Warning}}).afterClosed().pipe(E(e=>e)).subscribe(()=>{this.cartItemEvent.next({action:"CLEAR"})})}onPurchaseItem(e){this.cartItemEvent.next({action:"PURCHASE",item:e.cartItem,index:e.index})}onReturnItem(e){this.cartItemEvent.next({action:"RETURN",item:e.cartItem,index:e.index})}getItemByVariantId(e){return this.httpService.get(j.GetVariantByID,[{key:"ID",value:e},{key:"EntityID",value:this.storeService.outlet().ID}]).pipe(pe(t=>this.factoryService.generateCartItem(t)))}getItemByVariantByCode(e){return this.httpService.get(j.GetVariantByCode,[{key:"Code",value:e},{key:"EntityID",value:this.storeService.outlet().ID},{key:"Promotion",value:!0}]).pipe(pe(t=>this.factoryService.generateCartItem(t)))}getVariantInventory(e){return this.httpService.get(j.GetVariantStockByID,[{key:"EntityID",value:this.storeService.outlet().ID},{key:"ID",value:e}])}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};function ti(o,e){if(o&1&&(r(0,"td",29),s(1),a()),o&2){let t=p().index;l(),S(" ",t+1,". ")}}function ni(o,e){if(o&1&&(y(0),r(1,"div",30),D(2,"img",31),a(),h()),o&2){let t=p().$implicit;l(2),m("src",t.ThumbnailUrl,He)}}function ii(o,e){o&1&&(r(0,"div",32),D(1,"i",33),a())}function oi(o,e){if(o&1&&D(0,"small",16),o&2){let t=p().$implicit;m("innerHtml",t.Note,Bt)}}function ri(o,e){if(o&1&&(y(0),r(1,"span",24),s(2),b(3,"number"),a(),h()),o&2){let t=p().$implicit;l(2),B(Mt(3,1,t.Quantity,"1.0-4"))}}function ai(o,e){if(o&1&&(y(0),r(1,"span",34),s(2,"x"),a(),r(3,"div",35)(4,"span",36),s(5),b(6,"number"),a()(),h()),o&2){let t=p().$implicit;l(5),B(_(6,1,t.UnitQuantity))}}function ci(o,e){if(o&1&&(y(0),r(1,"span",37),s(2),b(3,"number"),a(),h()),o&2){let t=p().$implicit;l(2),S("@",_(3,1,t.VariantUnitQuantity),"")}}function li(o,e){if(o&1&&(y(0),r(1,"small",38),s(2),a(),h()),o&2){let t=p().$implicit;l(2),B(t.UOM?t==null?null:t.UOMName:"")}}function si(o,e){if(o&1&&(y(0),r(1,"div",39),s(2),b(3,"number"),a(),h()),o&2){let t=p().$implicit;l(2),S(" ",Mt(3,1,t.Price,"1.0-4")," ")}}function mi(o,e){if(o&1){let t=N();y(0),r(1,"tr",9),d("contextmenu",function(i){let c=f(t),x=c.$implicit,I=c.index,ae=p(2);return C(ae.onContextMenu(i,x,I))}),v(2,ti,2,1,"td",10),r(3,"td",11),d("click",function(){let i=f(t),c=i.$implicit,x=i.index,I=p(2);return C(I.onEdit(c,x))}),r(4,"div",12),v(5,ni,3,1,"ng-container",3)(6,ii,2,0,"ng-template",null,2,le),r(8,"div",13)(9,"div"),s(10),a(),r(11,"span",14),s(12),a(),r(13,"div"),D(14,"app-serial-note",15),a(),v(15,oi,1,1,"small",16),a()()(),r(16,"td",17),d("click",function(){let i=f(t),c=i.$implicit,x=i.index,I=p(2);return C(I.onEdit(c,x))}),r(17,"div",18)(18,"div",19),v(19,ri,4,4,"ng-container",20)(20,ai,7,3,"ng-container",20)(21,ci,4,3,"ng-container",20)(22,li,3,1,"ng-container",20),a()()(),r(23,"td",21),d("click",function(){let i=f(t),c=i.$implicit,x=i.index,I=p(2);return C(I.onEdit(c,x))}),v(24,si,4,4,"ng-container",20),a(),r(25,"td",21),d("click",function(){let i=f(t),c=i.$implicit,x=i.index,I=p(2);return C(I.onEdit(c,x))}),r(26,"div",22),s(27),b(28,"number"),a()(),r(29,"td",23),d("click",function(){let i=f(t),c=i.$implicit,x=i.index,I=p(2);return C(I.onEdit(c,x))}),r(30,"div",18)(31,"div",24),s(32),b(33,"number"),a()()(),r(34,"td",25)(35,"div",26)(36,"span",27),d("click",function(){let i=f(t),c=i.$implicit,x=i.index,I=p(2);return C(I.onRemove(c,x))}),D(37,"i",28),a()()()(),h()}if(o&2){let t=e.$implicit,n=G(7),i=p(2);l(2),m("ngIf",i.appConfig==null?null:i.appConfig.ModuleSell.Grid.RowNumberVisible),l(3),m("ngIf",t.ThumbnailUrl)("ngIfElse",n),l(5),B(t.Name),l(2),B(t.Code),l(2),m("serials",t==null?null:t.Serial),l(),Ie(t.Note?15:-1),l(4),m("ngIf",t.Quantity!==1&&t.Quantity!==0||t.UnitQuantity>1||t.VariantUnitQuantity>1),l(),m("ngIf",t.UnitQuantity>1),l(),m("ngIf",t.VariantUnitQuantity>1),l(),m("ngIf",t.UOM&&(i.appConfig==null||i.appConfig.ModuleSell==null?null:i.appConfig.ModuleSell.Grid.UOMVisible)),l(2),m("ngIf",t.Price!==t.Total),l(3),S(" ",t.Discount?_(28,14,t.Discount*-1)+"%":""," "),l(5),S(" ",i.roleService.product!=null&&i.roleService.product.Price?_(33,16,t.Total):" - "," ")}}function pi(o,e){if(o&1){let t=N();y(0),r(1,"table",6)(2,"tbody",7),d("cdkDropListDropped",function(i){f(t);let c=p();return C(c.onDrop(i))}),v(3,mi,38,18,"ng-container",8),a()(),h()}if(o&2){let t=p();l(3),m("ngForOf",t.cartItems)}}function ui(o,e){o&1&&(r(0,"div",40)(1,"div",41)(2,"div",42)(3,"div",43)(4,"div",44),D(5,"i",45),a(),r(6,"div",46)(7,"span"),s(8,"Empty Cart"),a(),D(9,"br"),r(10,"span"),s(11,"Add products to the cart"),a(),D(12,"br"),r(13,"span"),s(14,"or scan barcode"),a()()()()()())}function di(o,e){if(o&1){let t=N();r(0,"button",47),d("click",function(){let i=f(t).item,c=p();return C(c.onReverse(i,!0))}),s(1,"Return"),a(),r(2,"button",47),d("click",function(){let i=f(t).item,c=p();return C(c.onReverse(i,!1))}),s(3,"Purchase"),a()}}var dt=class o{roleService=u(de);appConfig;cartItems=[];set _cartItems(e){e&&(this.cartItems=[...e])}onRemoveEvent=new A;onEditEvent=new A;onDropItems=new A;onReturnEvent=new A;onPurchaseEvent=new A;contextMenu;contextMenuPosition={x:"0px",y:"0px"};onContextMenu(e,t,n){e.preventDefault(),this.contextMenuPosition.x=e.clientX+"px",this.contextMenuPosition.y=e.clientY+"px",t.Index=n,this.contextMenu.menuData={item:t},this.contextMenu.openMenu()}onDrop(e){Kt(this.cartItems,e.previousIndex,e.currentIndex),this.onDropItems.emit(this.cartItems)}onEdit(e,t){this.onEditEvent.emit({cartItem:e,index:t})}onRemove(e,t){this.onRemoveEvent.emit({cartItem:e,index:t})}onReverse(e,t){let n=e.Index;t?(e.Quantity>0&&(e.Quantity=e.Quantity*-1),this.onReturnEvent.emit({cartItem:e,index:n})):(e.Quantity<0&&(e.Quantity=e.Quantity*-1),this.onPurchaseEvent.emit({cartItem:e,index:n}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["POS-cart-display"]],viewQuery:function(t,n){if(t&1&&Lt(nt,7),t&2){let i;Wt(i=qt())&&(n.contextMenu=i.first)}},inputs:{appConfig:"appConfig",_cartItems:[0,"cartItems","_cartItems"]},outputs:{onRemoveEvent:"onRemove",onEditEvent:"onEdit",onDropItems:"onDropItems",onReturnEvent:"onReturn",onPurchaseEvent:"onPurchase"},decls:7,vars:7,consts:[["EMPTY_CART",""],["contextMenu","matMenu"],["NO_IMAGE",""],[4,"ngIf","ngIfElse"],[2,"visibility","hidden","position","fixed",3,"matMenuTriggerFor"],["matMenuContent",""],[1,"table","table-borderless"],["cdkDropList","",3,"cdkDropListDropped"],[4,"ngFor","ngForOf"],["cdkDrag","",1,"border-bottom",3,"contextmenu"],["style","width: 10px",4,"ngIf"],[1,"pe-0",2,"width","50%",3,"click"],[1,"d-flex","align-items-center"],[1,"d-block","ms-4",2,"line-height","18px"],[1,"fw-normal","fs-6","text-muted"],[3,"serials"],["title","Note",1,"special-TinyMCE","m-0","fst-italic","d-block",3,"innerHtml"],[1,"px-0","text-end",2,"width","15%",3,"click"],[1,"d-flex","align-items-center","justify-content-end"],[1,"d-flex","text-end","fw-normal","align-items-center",2,"line-height","20px"],[4,"ngIf"],[3,"click"],[1,"fw-normal","fs-5","text-danger"],[1,"pe-0",3,"click"],[1,"fs-5"],[1,"mt-6","ps-0"],[1,"d-flex","justify-content-end","align-items-center"],["role","button","title","Delete Item",1,"fs-3","cursor-pointer",3,"click"],[1,"fa","fa-trash","text-danger","fs-4"],[2,"width","10px"],[1,"ratio","ratio-1x1",2,"width","55px"],[1,"item-image",3,"src"],[1,"item-image","d-flex","justify-content-center","align-items-center","text-center","fs-1"],[1,"fa-solid","fa-image",2,"color","#b4b4b4c2"],[1,"fs-6","me-1","ms-1"],[1,"d-flex","algin-items-center"],["title","Unit Quantity",1,"fs-5","me-1"],["title","Variant Unit Quantity",1,"fs-5"],["title","UOM",1,"ps-1","fs-5"],[1,"fs-5","text-end"],[1,"row","g-0","h-100"],[1,"col-12"],[1,"d-flex","justify-content-center","align-items-center","h-100"],[1,"row"],[1,"col-12","d-flex","justify-content-center"],[1,"fa-regular","fa-cart-arrow-up","text-secondary",2,"font-size","110px"],[1,"col-12","justify-content-center","text-center","mt-5","empty-cart-description","text-secondary","headings-font-family"],["mat-menu-item","",3,"click"]],template:function(t,n){if(t&1&&(v(0,pi,4,1,"ng-container",3)(1,ui,15,0,"ng-template",null,0,le),D(3,"div",4),r(4,"mat-menu",null,1),v(6,di,4,0,"ng-template",5),a()),t&2){let i=G(2),c=G(5);m("ngIf",n.cartItems.length>0)("ngIfElse",i),l(3),Qt("left",n.contextMenuPosition.x)("top",n.contextMenuPosition.y),m("matMenuTriggerFor",c)}},dependencies:[O,ue,H,ee,Zt,Xt,Yt,En,_n,bn,Cn,gn,fn,nt],styles:[".item-image[_ngcontent-%COMP%]{height:50px;width:56px;display:block;border:solid 1px #dddddd;border-radius:5px;object-fit:contain}.example-menu[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;min-width:180px;max-width:280px;background-color:#fff;padding:6px 0}.example-menu-item[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer;border:none;-webkit-user-select:none;user-select:none;min-width:64px;line-height:36px;padding:0 16px;display:flex;align-items:center;flex-direction:row;flex:1}.example-menu-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.example-menu-item[_ngcontent-%COMP%]:active{background-color:#dcdcdc}.table[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(caption) > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{padding:12px 10px} .cdk-menu.cdk-menu-group.example-menu{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.empty-cart-description[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#c7c7c7}"]})};var fi=(o,e)=>({"text-danger":o,"text-custom-warning":e});function Ci(o,e){if(o&1&&(r(0,"mat-option",7)(1,"div",8)(2,"div",9)(3,"div"),s(4),a()()()()),o&2){let t=e.$implicit,n=p();m("value",t),l(2),m("ngClass",$t(4,fi,t.StateID==n.customerState.Suspended,t.StateID==n.customerState.WaitingForApproval))("title",t.StateID==n.customerState.Suspended?"Suspended":t.StateID==n.customerState.WaitingForApproval?"Waiting for Approval":""),l(2),B(t==null?null:t.Value)}}function bi(o,e){if(o&1){let t=N();r(0,"i",10),d("click",function(){f(t);let i=p();return C(i.openCustomerDetail())}),a()}}var gt=class o{httpService=u(K);router=u(Me);customerCtrl=new Ee;customerFiltered$=this.customerCtrl.valueChanges.pipe(E(e=>typeof e=="string"&&e.length>=3),At(300),Y(e=>this.getCustomerSuggestion(e)));customerSelected$=this.customerCtrl.valueChanges.pipe(E(e=>typeof e!="string"),T(e=>{this.onChange(e)}));createNewCustomer=new A;clickInput=new A;customerState=In;constructor(){this.customerSelected$.pipe(F()).subscribe()}getCustomerSuggestion(e){return this.httpService.get(j.GetCustomerSuggestions,[{key:"count",value:100},{key:"prefix",value:e}])}displayFn(e){return e?.Value}onCreateCustomer(){this.createNewCustomer.emit()}onClickInputValue(){this.clickInput.emit()}onChange=e=>{};onTouched=()=>{};writeValue(e){this.customerCtrl.patchValue(e,{onlySelf:!0,emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}openCustomerDetail(){let e=this.customerCtrl.value.Key;if(g.IsNotEmpty(e)){let t=this.router.serializeUrl(this.router.createUrlTree(["/menu/Contacts/Contact/Customers/Info"],{queryParams:{ID:e}}));window.open(t,"_blank")}}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["POS-customer-autocomplete"]],outputs:{createNewCustomer:"onCreateNewCustomer",clickInput:"onClickInput"},features:[De([{provide:Xe,multi:!0,useExisting:o}])],decls:8,vars:7,consts:[["auto","matAutocomplete"],[1,"d-flex","align-items-center","position-relative"],["matTooltipPosition","above","matTooltip","New Customer","role","button",1,"fa-light","fa-user-plus","position-absolute","cursor-pointer",2,"font-size","12px",3,"click"],["type","text","placeholder","Assign Customer",3,"click","formControl","matAutocomplete"],[3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],["matTooltipPosition","left","matTooltip","Open Customer Details",1,"fa-regular","fa-arrow-up-right-from-square","position-absolute"],[3,"value"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"ms-3","text-wrap","text-break",3,"ngClass","title"],["matTooltipPosition","left","matTooltip","Open Customer Details",1,"fa-regular","fa-arrow-up-right-from-square","position-absolute",3,"click"]],template:function(t,n){if(t&1){let i=N();r(0,"div",1)(1,"i",2),d("click",function(){return f(i),C(n.onCreateCustomer())}),a(),r(2,"input",3),d("click",function(){return f(i),C(n.onClickInputValue())}),a(),r(3,"mat-autocomplete",4,0),v(5,Ci,5,7,"mat-option",5),b(6,"async"),a(),v(7,bi,1,0,"i",6),a()}if(t&2){let i=G(4);l(2),m("formControl",n.customerCtrl)("matAutocomplete",i),l(),m("displayWith",n.displayFn),l(2),m("ngForOf",_(6,5,n.customerFiltered$)),l(2),Ie(n.customerCtrl&&(n.customerCtrl!=null&&n.customerCtrl.value)&&(!(n.customerCtrl==null||n.customerCtrl.value==null)&&n.customerCtrl.value.Key)?7:-1)}},dependencies:[O,Z,ue,Pe,rn,nn,Jt,on,we,te,J,Oe,et,Ze,it],styles:["input[_ngcontent-%COMP%]{width:100%;height:38px!important;border-radius:.375rem;border:1px solid #ced4da;padding-left:32px;padding-right:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i.fa-user-plus[_ngcontent-%COMP%]{font-size:16px;top:12px;left:11px}.text-custom-warning[_ngcontent-%COMP%]{color:#ff7a00d6}i.fa-arrow-up-right-from-square[_ngcontent-%COMP%]{position:absolute;right:13px;top:50%;transform:translateY(-50%);font-size:12px;z-index:2;cursor:pointer}"]})};var $e=class o{storeService=u(P);dialog=u(oe);httpService=u(K);createNewCustomer(){this.dialog.open(vn,{data:{options:this.storeService.loadForm()?.EstimateOptions,config:this.storeService.loadForm()?.AppConfigJSON?.ModuleContact,type:"customer",title:"New Customer Form"}}).afterClosed().pipe(E(e=>g.IsNotEmpty(e))).subscribe(e=>{let t=new re;t.Key=e.CustomerID,t.Value=e.ContactName,this.storeService.updateCustomer(t)})}onSelectCustomer(e){let t=this.storeService.outlet();this.httpService.get(j.GetCustomerPrivilegeByID,[{key:"ID",value:e.Key},{key:"EntityID",value:t.ID}]).pipe(Nt(()=>{let n=new re;return this.storeService.updateCustomer(n),Tt})).subscribe(n=>{let i=JSON.parse(JSON.stringify(e));i.PricebookID=n.PricebookID,this.storeService.updateCustomer(i)})}onDeleteCustomer(){g.IsNotEmpty(this.storeService?.customer()?.Key)&&this.dialog.open(Sn,{data:{title:"Re-assign customer",message:"Are you sure to re-assign the customer?"}}).afterClosed().pipe(E(e=>e)).subscribe(()=>{let e=new re;this.storeService.updateCustomer(e)})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var ft=class o{clickEvent=new A;onClick(){this.clickEvent.emit()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["app-note-button"]],outputs:{clickEvent:"onClickEvent"},decls:2,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"],[1,"fa-regular","fa-note-sticky","fa-xl"]],template:function(t,n){t&1&&(r(0,"button",0),d("click",function(){return n.onClick()}),D(1,"i",1),a())},dependencies:[O],styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};function _i(o,e){if(o&1&&(r(0,"div"),s(1),b(2,"number"),a()),o&2){let t=p();l(),S(" ",_(2,1,t.totalAmount)," ")}}function vi(o,e){o&1&&s(0," - ")}var Ct=class o{payEvent=new A;totalItems=0;totalQuantity=0;totalAmount=0;rolePrice=!0;constructor(){}ngOnInit(){}onPay(){this.payEvent.emit()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["app-pay-button"]],inputs:{totalItems:"totalItems",totalQuantity:"totalQuantity",totalAmount:"totalAmount",rolePrice:"rolePrice"},outputs:{payEvent:"onPayEvent"},decls:11,vars:6,consts:[["HIDDENCOST",""],["type","button",1,"btn","btn-success","fs-1","py-4","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fs-6"],[4,"ngIf","ngIfElse"]],template:function(t,n){if(t&1){let i=N();r(0,"button",1),d("click",function(){return f(i),C(n.onPay())}),r(1,"div",2)(2,"div")(3,"span"),s(4,"Submit"),a(),r(5,"small",3),s(6),b(7,"number"),a()(),v(8,_i,3,3,"div",4)(9,vi,1,0,"ng-template",null,0,le),a()()}if(t&2){let i=G(10);l(6),he(" (",_(7,4,n.totalItems)," Items & ",n.totalQuantity," Qty) "),l(2),m("ngIf",n.rolePrice)("ngIfElse",i)}},dependencies:[O,H,ee],styles:["button[_ngcontent-%COMP%]{border-right:.1px solid #fff;margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;position:relative;flex:1 1 auto;border-left:.1px solid #fff}"]})};var bt=class o{clickEvent=new A;onClick(){this.clickEvent.emit()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["app-discount-button"]],outputs:{clickEvent:"onClickEvent"},decls:2,vars:0,consts:[["type","button","matTooltip","Discount / Tax","matTooltipPosition","above",1,"btn","btn-success","fs-5",3,"click"],[1,"fa-light","fa-percent"]],template:function(t,n){t&1&&(r(0,"button",0),d("click",function(){return n.onClick()}),D(1,"i",1),a())},dependencies:[O,et,Ze],styles:["button[_ngcontent-%COMP%]{border-right:.1px solid #fff;border-top-right-radius:0;border-bottom-right-radius:0;position:relative;flex:1 1 auto}"]})};var Ue=class o{store=u(P);toastr=u(Ye);dialog=u(oe);updateState$=U(this.store.complete).pipe(E(e=>e.Success),T(()=>this.store.updateState(3)),F());constructor(){this.updateState$.subscribe()}onPay(){if(this.validatePayOrder()==!1)return;let t={Items:this.cartItemPreSubmission(),Order:R({},this.store.order())};this.dialog.open(kn,{data:{transactionData:t,api:j.SubmitEstimate}}).afterClosed().pipe(E(n=>g.IsNotEmpty(n))).subscribe(n=>{this.store.updateComplete(n)})}cartItemPreSubmission(){let e=JSON.parse(JSON.stringify(this.store.cartItems()));return e=e.map(t=>(delete t.Variant,t)),e}validatePayOrder(){let e=!0;return g.IsEmpty(this.store.outlet().ID)&&(this.toastr.error("Please select outlet before proceeding..",xe.Error),e=!1),g.IsEmpty(this.store.customer().Key)&&(this.toastr.warning("Please select a customer!",xe.Warning),e=!1),this.store.cartItems().length==0&&(this.toastr.error("You must have at least one item.",xe.Error),e=!1),g.IsEmpty(this.store.order().Number)&&(this.toastr.error("Number cannot be empty.",xe.Error),e=!1),e}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var _t=class o{constructor(e,t){this.dialogRef=t;this.discountAmount.set(e.discountAmount),this.discount.set(e.discount),this.tax=V(e.tax),this.currency=V(e.currency),this.taxes.set(e.taxes),this.initModalConfig()}modalConfig=new Ae;discountAmount=V(0);discount=V(0);tax;discounts=V([0,0,0]);currency;taxes=V([]);initModalConfig(){this.modalConfig.title="Discount and Tax",this.modalConfig.customWidth="400px"}onClose(){this.dialogRef.close()}onSave(){this.dialogRef.close({discountAmount:this.discountAmount(),discount:this.discount(),tax:this.tax()})}onSelectTax(e){this.tax.set(e)}onDiscountCalculatorChange(e,t){let n=this.discounts();n[t]=e,this.discounts.set(n),this.calculateDiscountCalculator()}calculateDiscountCalculator(){let e=this.discounts(),t=100;e.forEach(i=>{i&&i>0&&(t=t*(100-i)/100)});let n=100-t;this.discount.set(n)}static \u0275fac=function(t){return new(t||o)(X(ke),X(Te))};static \u0275cmp=M({type:o,selectors:[["app-dialog-discount"]],decls:48,vars:10,consts:[[3,"keydown.F2","onOk","onCancel","onClose","config"],[1,"container"],["matTooltipPosition","above","matTooltip","Discount","tabTitle","Discount"],[1,"row","d-flex","align-items-center","justify-content-start"],[1,"col-3"],[1,"fw-bold","d-block"],[1,"col-9"],["type","text","data-cy","discount1","autoNum","","percentage","","decimalPlaces","2",1,"form-control","d-inline-block",2,"width","100px",3,"ngModelChange","ngModel"],[1,"ms-1"],[1,"row","d-flex","align-items-center","justify-content-start","mt-6"],["type","text","data-cy","discountamount","autoNum","",1,"form-control","d-inline-block",2,"width","100px",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Tax","tabTitle","Tax"],["bindLabel","Label","appendTo","body","bindValue","ID","placeholder","Tax","data-cy","Tax",2,"width","150px",3,"change","clearable","ngModel","items"],["matTooltipPosition","above","matTooltip","Calculation","tabTitle","Calculator"],[1,"row","mt-6","g-0","d-flex","align-items-center","justify-content-start"],[1,"col-4"],[1,"col-8","ps-4"],["type","text","data-cy","discountCal1","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"],[1,"mx-2"],["type","text","data-cy","discountCal2","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"],["type","text","data-cy","discountCal3","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"]],template:function(t,n){if(t&1&&(r(0,"modal-material",0),d("keydown.F2",function(){return n.onSave()})("onOk",function(){return n.onSave()})("onCancel",function(){return n.onClose()})("onClose",function(){return n.onClose()}),r(1,"content")(2,"div",1)(3,"custom-tabs"),y(4),r(5,"tab",2)(6,"div",3)(7,"div",4)(8,"label",5),s(9,"Discount %"),a()(),r(10,"div",6)(11,"input",7),W("ngModelChange",function(c){return L(n.discount,c)||(n.discount=c),c}),a(),r(12,"span",8),s(13,"%"),a()()(),r(14,"div",9)(15,"div",4)(16,"label",5),s(17),a()(),r(18,"div",6)(19,"input",10),W("ngModelChange",function(c){return L(n.discountAmount,c)||(n.discountAmount=c),c}),a()()()(),h(),y(20),r(21,"tab",11)(22,"div",3)(23,"div",4)(24,"label",5),s(25,"Tax"),a()(),r(26,"div",6)(27,"ng-select",12),d("change",function(c){return n.onSelectTax(c)}),a()()()(),h(),y(28),r(29,"tab",13)(30,"div",14)(31,"div",15)(32,"label",5),s(33,"Discount Calculator"),a()(),r(34,"div",16)(35,"input",17),d("ngModelChange",function(c){return n.onDiscountCalculatorChange(c,0)}),a(),r(36,"span"),s(37," %"),a(),r(38,"span",18),s(39,"+"),a(),r(40,"input",19),d("ngModelChange",function(c){return n.onDiscountCalculatorChange(c,1)}),a(),r(41,"span"),s(42," %"),a(),r(43,"span",18),s(44,"+"),a(),r(45,"input",20),d("ngModelChange",function(c){return n.onDiscountCalculatorChange(c,2)}),a(),r(46,"span"),s(47," %"),a()()()(),h(),a()()()()),t&2){let i;m("config",n.modalConfig),l(11),Q("ngModel",n.discount),l(6),S("Discount ",(i=n.currency())==null?null:i.Symbol,""),l(2),Q("ngModel",n.discountAmount),l(8),m("clearable",!1)("ngModel",n.tax().ID)("items",n.taxes()),l(8),m("ngModel",n.discounts[0]),l(5),m("ngModel",n.discounts[1]),l(5),m("ngModel",n.discounts[2])}},dependencies:[O,Fe,Ve,ot,at,rt,ie,te,J,ne,Ne,ge,fe],encapsulation:2})};var ye=class o{storeService=u(P);totalItemsQty=$(()=>this.storeService.cartItems().reduce((n,i)=>n+i.Quantity,0));totalItemsAmount=$(()=>this.storeService.cartItems().reduce((n,i)=>n+i.Total,0));taxAmount=$(()=>{let e=this.storeService.tax(),t=0;return e.Rate>0&&(e.CalculationTypeID==1?t=this.calculateTaxInclude(e):t=this.calculateTaxAdd(e)),t});totalAmount=$(()=>{let e=this.storeService.tax(),t=this.storeService.order().DiscountAmount,n=this.storeService.order().Discount,i=this.totalItemsAmount(),c=this.calculatePercentagDisc(n,i),x=i-t-c;return e.CalculationTypeID==0&&(x=x+this.taxAmount()),x});discountPercentageAmount=$(()=>{let e=this.storeService.order().Discount,t=this.totalItemsAmount();return this.calculatePercentagDisc(e,t)});calculateTaxInclude(e){let t=this.grossTotalTaxable();return e.Rate/(100+e.Rate)*t}calculateTaxAdd(e){let t=this.grossTotalTaxable();return e.Rate/100*t}grossTotalTaxable(){let e=this.taxableItems(),t=this.calculateTaxableItemsPrice(),n=this.storeService.discount();if(e.length!==0){let i=this.calculateDiscountTaxableItem();t=t*(100-n.discount)/100,t=t-i}return t}calculateDiscountTaxableItem(){let e=this.taxableItems(),t=this.totalItemsAmount(),n=this.storeService.discount().discountAmount,i=0,c=0,x=0,I=0;for(let ae of e)i=ae.getItemAfterDiscount/t,c=i*n,I=c*ae.Quantity,x+=I;return x}calculatePercentagDisc(e,t){return e/100*t}calculateTaxableItemsPrice(){return this.taxableItems().filter(n=>n.Taxable).reduce((n,i)=>n+i.Total,0)}taxableItems(){return this.storeService.cartItems().filter(t=>t.Taxable)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=k({token:o,factory:o.\u0275fac})};var xi=o=>({selected:o});function Si(o,e){if(o&1){let t=N();r(0,"div",12)(1,"span",13),s(2,"@"),a(),r(3,"input",14),W("ngModelChange",function(i){f(t);let c=p();return L(c.currency().ExchangeRate,i)||(c.currency().ExchangeRate=i),C(i)}),a()()}if(o&2){let t=p();l(3),Q("ngModel",t.currency().ExchangeRate)}}function Ii(o,e){if(o&1){let t=N();r(0,"div",15)(1,"label",16)(2,"input",17),d("ngModelChange",function(){let i=f(t).$implicit,c=p();return C(c.onChangeTag(i.ID))}),a(),s(3),a()()}if(o&2){let t,n=e.$implicit,i=e.index,c=p();l(),Pt("for","potype-"+i),m("ngClass",q(5,xi,((t=c.tag())==null?null:t.ID)==n.ID)),l(),Pt("id","potype-"+i),m("ngModel",c.tag().ID),l(),S(" ",n.Name," ")}}var vt=class o{constructor(e,t){this.dialogRef=t;this.initModalConfig(),this.currencies.set(e.currencies),this.tags.set(e.tags),this.tag=V(e.tag),this.currency=V(e.currency),this.defaultCurrencyId=V(e.defaultCurrencyId)}modalConfig=new Ae;currencies=V([]);tags=V([]);tag;currency;defaultCurrencyId;initModalConfig(){this.modalConfig.title="Order Note",this.modalConfig.customWidth="700px"}onChangeCurrency(e){let t=this.currencies()?.find(n=>n.ID===e);this.currency.set(t)}onChangeTag(e){let t=this.tags()?.find(n=>n.ID===e);this.tag.set(t)}onClose(){this.dialogRef.close()}onSave(){this.dialogRef.close({currency:this.currency(),tag:this.tag()})}static \u0275fac=function(t){return new(t||o)(X(ke),X(Te))};static \u0275cmp=M({type:o,selectors:[["app-dialog-note"]],decls:16,vars:6,consts:[[3,"keydown.F2","onOk","onCancel","onClose","config"],[1,"container"],["matTooltipPosition","above","matTooltip","Currency","tabTitle","Currency"],[1,"row","d-flex","align-items-center","justify-content-start","mt-6"],[1,"row","ms-4"],[1,"ps-0","col-sm-4"],["bindLabel","Name","bindValue","ID","placeholder","Currency","appendTo","body",3,"ngModelChange","items","clearable","ngModel"],["class","col-sm-4 d-flex",4,"ngIf"],["matTooltipPosition","above","matTooltip","Tag","tabTitle","Tag"],[1,"row"],[1,"col-12"],["class","rad-btn",4,"ngFor","ngForOf"],[1,"col-sm-4","d-flex"],[1,"pt-4"],["type","text","autoNum","",1,"border","border-light",3,"ngModelChange","ngModel"],[1,"rad-btn"],[3,"for","ngClass"],["type","radio",3,"ngModelChange","ngModel","id"]],template:function(t,n){if(t&1&&(r(0,"modal-material",0),d("keydown.F2",function(){return n.onSave()})("onOk",function(){return n.onSave()})("onCancel",function(){return n.onClose()})("onClose",function(){return n.onClose()}),r(1,"content")(2,"div",1)(3,"custom-tabs"),y(4),r(5,"tab",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"ng-select",6),d("ngModelChange",function(c){return n.onChangeCurrency(c)}),a()(),v(10,Si,4,1,"div",7),a()()(),h(),y(11),r(12,"tab",8)(13,"div",9)(14,"div",10),v(15,Ii,4,7,"div",11),a()()(),h(),a()()()()),t&2){let i;m("config",n.modalConfig),l(9),m("items",n.currencies())("clearable",!1)("ngModel",n.currency().ID),l(),m("ngIf",((i=n.currency())==null?null:i.ID)!=n.defaultCurrencyId()),l(5),m("ngForOf",n.tags())}},dependencies:[O,Z,ue,H,Fe,Ve,ot,at,rt,ie,te,zt,J,ne,Ne,ge,fe],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.rad-btn[_ngcontent-%COMP%]{position:relative;display:inline-block}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #dddddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label.selected[_ngcontent-%COMP%]{background:#dcdcdc;border:1px solid #dcdcdc}"]})};var yt=class o{onClickEvent=new A;constructor(){}ngOnInit(){}onClick(){this.onClickEvent.emit()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["app-clear-button"]],outputs:{onClickEvent:"onClickEvent"},decls:3,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"]],template:function(t,n){t&1&&(r(0,"button",0),d("click",function(){return n.onClick()}),r(1,"span"),s(2,"Clear"),a()())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};function Di(o,e){if(o&1&&(y(0),r(1,"tr")(2,"th",12),s(3,"Amount"),a(),r(4,"td",13),s(5),b(6,"number"),a()(),h()),o&2){let t=p();l(5),B(_(6,1,t.calculationService==null?null:t.calculationService.totalItemsAmount()))}}function Pi(o,e){if(o&1&&(r(0,"tr")(1,"th",12),s(2),a(),r(3,"td",14),s(4),b(5,"number"),a()()),o&2){let t=p(2);l(2),S("Discount ",t.storeService==null?null:t.storeService.discount().discount,"%"),l(2),S(" ",_(5,2,t.calculationService.discountPercentageAmount()*-1),"")}}function Mi(o,e){if(o&1&&(r(0,"tr")(1,"th",12),s(2),a(),r(3,"td",14),s(4),b(5,"number"),a()()),o&2){let t,n,i=p(2);l(2),S("Discount ",(t=i.storeService.currency())==null?null:t.Symbol,""),l(2),S(" ",_(5,2,((n=i.storeService.discount())==null?null:n.discountAmount)*-1),"")}}function Ei(o,e){if(o&1&&(r(0,"tr")(1,"th",12),s(2),a(),r(3,"td",13),s(4),b(5,"number"),a()()),o&2){let t,n=p(2);l(2),B((t=n.storeService.tax())==null?null:t.Label),l(2),B(_(5,2,n.calculationService.taxAmount()))}}function Oi(o,e){if(o&1&&(y(0),v(1,Pi,6,4,"tr",3)(2,Mi,6,4,"tr",3)(3,Ei,6,4,"tr",3),h()),o&2){let t,n,i=p();l(),m("ngIf",i.storeService.discount().discount!=0),l(),m("ngIf",((t=i.storeService.discount())==null?null:t.discountAmount)!=0),l(),m("ngIf",((n=i.storeService.tax())==null?null:n.Rate)!=0)}}var ht=class o{storeService=u(P);orderService=u(se);roleService=u(de);payService=u(Ue);calculationService=u(ye);cartService=u(me);dialog=u(oe);taxCalculationType=tt;totalItemsQty=$(()=>this.storeService.cartItems()?.length);isShowAmount=$(()=>this.storeService?.tax()?.CalculationTypeID==0&&this.storeService?.tax()?.Rate||this.storeService.discount()?.discount!=0||this.storeService.discount()?.discountAmount!=0);onOpenDialogNote(){this.dialog.open(vt,{data:{tags:this.storeService.loadForm().SalesOrderTags,currencies:this.storeService.loadForm().Currencies,currency:this.storeService.currency(),tag:this.storeService.tag(),defaultCurrencyId:this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID}}).afterClosed().pipe(E(e=>g.IsNotEmpty(e))).subscribe(e=>{this.storeService.updateCurrency(e.currency),this.storeService.updateTag(e.tag)})}onOpenDialogDiscount(){this.dialog.open(_t,{data:{discountAmount:this.storeService.order().DiscountAmount,discount:this.storeService.order().Discount,tax:this.storeService.tax(),currency:this.storeService.currency(),taxes:this.storeService.loadForm().Taxes}}).afterClosed().pipe(E(e=>g.IsNotEmpty(e))).subscribe(e=>{this.storeService.updateDiscount({discountAmount:e.discountAmount,discount:e.discount}),this.storeService.updateTax(e.tax)})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["POS-cart-action"]],decls:13,vars:6,consts:[[1,"row","g-0","px-5","justify-content-end"],[1,"col-6",2,"padding-right","15px"],[1,"table","table-borderless"],[4,"ngIf"],[1,"row","g-0","pb-6","px-5"],[1,"col-5","d-flex","justify-content-between","pe-5",2,"column-gap","12px"],[2,"flex-grow","1",3,"onClickEvent"],[2,"flex-grow","3",3,"onClickEvent"],[1,"col-7"],[1,"btn-group","w-100"],[1,"d-inline-flex",3,"onClickEvent"],[1,"d-inline-flex","w-100",3,"onPayEvent","rolePrice","totalQuantity","totalItems","totalAmount"],[1,"text-start"],[1,"text-end","fs-5"],[1,"text-end","fs-5","text-danger"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1)(2,"table",2),v(3,Di,7,3,"ng-container",3)(4,Oi,4,3,"ng-container",3),a()()(),r(5,"div",4)(6,"div",5)(7,"app-note-button",6),d("onClickEvent",function(){return n.onOpenDialogNote()}),a(),r(8,"app-clear-button",7),d("onClickEvent",function(){return n.cartService.clearCart()}),a()(),r(9,"div",8)(10,"div",9)(11,"app-discount-button",10),d("onClickEvent",function(){return n.onOpenDialogDiscount()}),a(),r(12,"app-pay-button",11),d("onPayEvent",function(){return n.payService.onPay()}),a()()()()),t&2&&(l(3),m("ngIf",n.isShowAmount()),l(),m("ngIf",n.calculationService.totalItemsQty()>0),l(8),m("rolePrice",n.roleService.product.Price)("totalQuantity",n.calculationService.totalItemsQty())("totalItems",n.totalItemsQty())("totalAmount",n.calculationService.totalAmount()))},dependencies:[O,H,ee,bt,ft,Ct,yt],encapsulation:2})};var Fn=o=>({ID:o}),wi=()=>["/menu/Orders/Orders/Estimate/Info"],Ti=o=>({"border-top":o});function ki(o,e){if(o&1&&(y(0),r(1,"div",28)(2,"div",29),s(3),a(),r(4,"div",29),s(5),b(6,"number"),a()(),h()),o&2){let t=e.$implicit;l(3),B(t.Name),l(2),S("",_(6,2,t.Total)," ")}}function Ni(o,e){if(o&1&&(y(0),r(1,"div",30)(2,"div",31),s(3),a(),r(4,"div",31),s(5),b(6,"number"),a()(),h()),o&2){let t,n=p();l(3),S("Amount: ",(t=n.storeService.currency())==null?null:t.Symbol,""),l(2),B(_(6,2,n.calculationService.totalItemsAmount()))}}function Ai(o,e){if(o&1&&(r(0,"div",32)(1,"div",31),s(2),b(3,"number"),a(),r(4,"div",33),s(5),b(6,"number"),a()()),o&2){let t,n=p();l(2),he("","Discount "+_(3,3,(t=n.storeService.discount())==null?null:t.discount)+" %",": ",(t=n.storeService.currency())==null?null:t.Symbol,""),l(3),B(_(6,5,n.calculationService.discountPercentageAmount()*-1))}}function Vi(o,e){if(o&1&&(r(0,"div",32)(1,"div",31),s(2),a(),r(3,"div",33),s(4),b(5,"number"),a()()),o&2){let t,n,i=p();l(2),S("Discount: ",(t=i.storeService.currency())==null?null:t.Symbol,""),l(2),S("",_(5,2,((n=i.storeService.discount())==null?null:n.discountAmount)*-1)," ")}}function Fi(o,e){if(o&1&&(r(0,"div",32)(1,"div",31),s(2),a(),r(3,"div",31),s(4),b(5,"number"),a()()),o&2){let t,n=p();l(2),he("",(t=n.storeService.tax())==null?null:t.Label,": ",(t=n.storeService.currency())==null?null:t.Symbol,""),l(2),B(_(5,3,n.calculationService.taxAmount()))}}var xt=class o{orderService=u(se);calculationService=u(ye);storeService=u(P);isShowAmount=$(()=>this.storeService?.tax()?.CalculationTypeID==0&&this.storeService?.tax()?.Rate||this.storeService.discount()?.discount!=0||this.storeService.discount()?.discountAmount!=0);handleF8(){this.orderService.newOrder()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["POS-complete"]],hostBindings:function(t,n){t&1&&d("keydown.F8",function(c){return n.handleF8(c)},!1,ze)},decls:40,vars:21,consts:[[1,"pt-7",2,"border-bottom","1px solid rgba(0, 0, 0, 0.1)"],[1,"ps-7","fw-normal","pb-9"],[1,"order-complete"],[1,"container-fluid","pt-8"],[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body"],[1,"row",2,"height","115px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","my-6"],["target","_blank","routerLink","/print/Estimate",1,"btn","bg-light-gray","btn-secondary",3,"queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body","py-4"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","row justify-content-end pb-2",4,"ngIf"],[1,"row","justify-content-end","pt-4",3,"ngClass"],[1,"col-4","text-end","h5"],[1,"row","justify-content-between","border-bottom","py-2"],[1,"col","text-end"],[1,"row","justify-content-end","mt-2","pb-2"],[1,"col-4","text-end"],[1,"row","justify-content-end","pb-2"],[1,"col-4","text-end","text-danger"]],template:function(t,n){if(t&1&&(r(0,"div",0)(1,"h1",1),s(2,"Estimate"),a()(),r(3,"section",2)(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"h1",8),D(10,"i",9),s(11,"Order Complete "),a()(),r(12,"div",10)(13,"div",11)(14,"div",12)(15,"a",13),d("click",function(){return n.orderService.newOrder()}),s(16,"New Order (F8)"),a()()()(),r(17,"div",14)(18,"div",15)(19,"a",16),D(20,"i",17),s(21,"Print Receipt"),a()()()()(),r(22,"div",18)(23,"div",6)(24,"div",19)(25,"h3",20)(26,"a",21),s(27),a()()(),r(28,"div",22),v(29,ki,7,4,"ng-container",23)(30,Ni,7,4,"ng-container",24)(31,Ai,7,7,"div",25)(32,Vi,6,4,"div",25)(33,Fi,6,5,"div",25),r(34,"div",26)(35,"div",27),s(36),a(),r(37,"div",27),s(38),b(39,"number"),a()()()()()()()()),t&2){let i,c,x,I,ae;l(19),m("queryParams",q(14,Fn,n.storeService.complete().OrderID)),l(7),m("routerLink",Ge(16,wi))("queryParams",q(17,Fn,n.storeService.complete().OrderID)),l(),S("Estimate #",(i=n.storeService.complete())==null?null:i.InvoiceNumber,""),l(2),m("ngForOf",n.storeService.cartItems()),l(),m("ngIf",n.isShowAmount()),l(),m("ngIf",((c=n.storeService.discount())==null?null:c.discount)>0),l(),m("ngIf",((x=n.storeService.discount())==null?null:x.discountAmount)>0),l(),m("ngIf",((I=n.storeService.tax())==null?null:I.Rate)>0),l(),m("ngClass",q(19,Ti,n.isShowAmount())),l(2),S("Total: ",(ae=n.storeService.currency())==null?null:ae.Symbol,""),l(2),B(_(39,12,n.calculationService.totalAmount()))}},dependencies:[O,Z,ue,H,ee,Ke,Je,an],styles:[".order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.125);padding-bottom:.9375rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{max-width:500px;margin-top:30px;margin-bottom:30px}"]})};var St=class o{route=u(Me);dialog=u(oe);addItem=new A;handleF8(){this.dialog.openDialogs&&this.dialog.openDialogs.length>0||this.onAddItem()}onAddItem(){this.addItem.emit()}redirectToPrevious(){this.route.navigate(["/menu/Estimate/V1"])}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["POS-more-action"]],hostBindings:function(t,n){t&1&&d("keydown.F4",function(c){return n.handleF8(c)},!1,ze)},outputs:{addItem:"onAddItem"},decls:14,vars:0,consts:[["id","moreMenu","data-bs-toggle","dropdown",1,"d-flex","align-items-center","cursor-pointer"],[1,"me-2"],[1,"fa-solid","fa-caret-down","fa-lg"],[1,"fs-6","headings-font-family","pb-1"],[1,"h-100","d-flex","align-items-center","justify-content-between"],["aria-labelledby","moreMenu",1,"dropdown-menu","more-actions"],[1,"d-flex"],[1,"dropdown-header","text-dark","col"],[1,"h5","mb-4"],[1,"dropdown-divider","m-0"],[1,"cursor-pointer",3,"click"],["icon","fa-circle-plus fa-solid","label","Add New"]],template:function(t,n){t&1&&(r(0,"span",0)(1,"span",1),D(2,"i",2),a(),r(3,"span",3),s(4,"More Actions"),a()(),r(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),s(10,"Item"),a(),D(11,"div",9),r(12,"li",10),d("click",function(){return n.onAddItem()}),D(13,"POS-dropdown-item-more-action",11),a()()()()())},dependencies:[O,On],encapsulation:2})};function Ri(o,e){o&1&&(y(0),D(1,"POS-complete"),h())}function Bi(o,e){if(o&1){let t=N();r(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"POS-select-outlet-form",8),b(6,"async"),d("ngModelChange",function(i){f(t);let c=p();return C(c.outletService.updateOutlet(i))}),a()(),r(7,"POS-invoice-number-form",9),b(8,"async"),d("ngModelChange",function(i){f(t);let c=p();return C(c.orderService.updateOrderNumber(i))}),a(),r(9,"POS-invoice-date",10),d("ngModelChange",function(i){f(t);let c=p();return C(c.orderService.updateOrderDate(i))}),a()()(),r(10,"div",11)(11,"div",12)(12,"div",13)(13,"POS-more-action",14),d("onAddItem",function(){f(t);let i=p();return C(i.cartItemService.onOpenAddDialog())}),a()(),r(14,"div",15)(15,"ng-select-infinite",16,1),b(17,"async"),d("selectedChange",function(i){f(t);let c=p();return C(c.orderService.updateSalesPersonId(i))}),a()()()()(),r(18,"div",17)(19,"div",18)(20,"POS-quick-key",19),b(21,"async"),d("onSelectVariant",function(i){f(t);let c=p();return C(c.cartItemService.onSelectQuickkeyItem(i))}),a()(),r(22,"div",20)(23,"div",21)(24,"div",22),D(25,"POS-variant-autocomplete",23),a(),r(26,"div",15)(27,"POS-customer-autocomplete",24),d("onCreateNewCustomer",function(){f(t);let i=p();return C(i.customerService.createNewCustomer())})("ngModelChange",function(i){f(t);let c=p();return C(c.customerService.onSelectCustomer(i))})("onClickInput",function(){f(t);let i=p();return C(i.customerService.onDeleteCustomer())}),a()()(),r(28,"POS-cart-display",25),b(29,"async"),d("onRemove",function(i){f(t);let c=p();return C(c.cartItemService.removeCartItem(i))})("onEdit",function(i){f(t);let c=p();return C(c.cartItemService.onOpenEditDialog(i))})("onDropItems",function(i){f(t);let c=p();return C(c.cartItemService.onDropItems(i))})("onPurchase",function(i){f(t);let c=p();return C(c.cartItemService.onPurchaseItem(i))})("onReturn",function(i){f(t);let c=p();return C(c.cartItemService.onReturnItem(i))}),a(),D(30,"POS-cart-action"),a()()()}if(o&2){let t,n=p();l(5),m("ngModel",n.storeService.outlet())("outlets",n.storeService.loadForm().Entities)("isOpenAfterLoad",_(6,18,n.outletService.isOpenDialog$)),l(2),m("ngModel",_(8,20,n.orderService.orderNumber$))("isEdit",n.isEditOrder()),l(2),m("ngModel",n.storeService.order().Date)("disabled",!(!(n.role==null||n.role.global==null)&&n.role.global.Date))("tooltip",!(n.role==null||n.role.global==null)&&n.role.global.Date?"":"Date role is required"),l(6),m("clearable",!0)("optionTitle",!0)("items",_(17,22,n.orderService.salesPersons$))("selected",n.storeService.order().SalesID),l(5),m("quickKey",_(21,24,n.quickkeyService.quickkeys$))("outletID",n.storeService.outlet().ID),l(5),m("formControl",n.cartItemService.variantSearchCtrl),l(2),m("ngModel",n.storeService.customer()),l(),m("cartItems",_(29,26,n.cartItemService.cartItems$))("appConfig",(t=n.storeService.loadForm())==null?null:t.AppConfigJSON)}}var Rn=class o extends en{loadFormService=u(je);storeService=u(P);role=u(de);outletService=u(Qe);orderService=u(se);quickkeyService=u(Le);cartItemService=u(me);customerService=u($e);intercomService=u(Gt);isCompleteOrder=$(()=>this.storeService.state()==3);isEditOrder=$(()=>this.storeService.state()==1);constructor(e){super(e),this.menuData$.subscribe(),this.intercomService.hideLauncher()}ngOnDestroy(){this.intercomService.showLauncher()}static \u0275fac=function(t){return new(t||o)(X(tn))};static \u0275cmp=M({type:o,selectors:[["POS-estimate-v2"]],features:[De([P,je,Qe,se,Le,me,$e,Ue,ye,be,ve]),jt],decls:3,vars:2,consts:[["NOT_COMPLETE",""],["ngSelectInfinite",""],[4,"ngIf","ngIfElse"],[1,"container-fluid"],[1,"row","header","border-bottom"],[1,"col-5","border-end"],[1,"left-toolbar-container","h-100","d-flex","align-items-center","justify-content-between"],[1,"d-flex"],[3,"ngModelChange","ngModel","outlets","isOpenAfterLoad"],["transactionType","Estimate",3,"ngModelChange","ngModel","isEdit"],[3,"ngModelChange","ngModel","disabled","tooltip"],[1,"col-7","d-flex","align-items-center"],[1,"row","flex-grow-1"],[1,"col-lg-7","col-5","d-flex","align-items-center"],[3,"onAddItem"],[1,"col-5","ps-0"],["bindValue","ID","bindLabel","Name","placeholder","Assign Sales Person",1,"sales-person","select-max-width",3,"selectedChange","clearable","optionTitle","items","selected"],[1,"row","content"],[1,"col-5","border-end","pt-1"],[3,"onSelectVariant","quickKey","outletID"],[1,"col-7","pt-5","px-0","d-flex","flex-column"],[1,"row","w-100","ms-0"],[1,"col-7","px-0"],[3,"formControl"],[3,"onCreateNewCustomer","ngModelChange","onClickInput","ngModel"],[1,"cart-display",3,"onRemove","onEdit","onDropItems","onPurchase","onReturn","cartItems","appConfig"]],template:function(t,n){if(t&1&&v(0,Ri,2,0,"ng-container",2)(1,Bi,31,28,"ng-template",null,0,le),t&2){let i=G(2);m("ngIf",n.isCompleteOrder())("ngIfElse",i)}},dependencies:[O,H,Pe,Dn,we,J,Oe,Pn,ie,ne,dn,sn,ln,Mn,dt,gt,it,ct,ht,xt,St],styles:["ng-select-infinite.sales-person.select-max-width>ng-select{padding-right:10px;height:38px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container{font-size:.75rem;border:.5px solid #d7d7d7;padding-right:6px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container>.ng-arrow-wrapper{width:12px;padding-bottom:2px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container>.ng-value-container{padding-left:6px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container{min-height:38px!important;height:38px!important;border:none} ng-select-infinite.sales-person.select-max-width.offline>.ng-select.ng-select-single .ng-select-container{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container .ng-input{padding-left:5px!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container .ng-input>input{padding-top:5px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single>ng-dropdown-panel.ng-dropdown-panel{font-size:.75rem;width:95%!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-focused .ng-select-container{box-shadow:none!important;border-color:transparent!important}.left-toolbar-container[_ngcontent-%COMP%]{position:relative}.left-toolbar-container[_ngcontent-%COMP%] POS-invoice-number-form[_ngcontent-%COMP%]{position:absolute;top:34px;left:32px}.header[_ngcontent-%COMP%]{min-height:60px}.content[_ngcontent-%COMP%]{min-height:calc(100vh - 60px)}.supplier-more-menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.cart-display[_ngcontent-%COMP%]{flex-grow:1;height:0px;overflow-y:auto}input[_ngcontent-%COMP%]{width:100%;height:38px!important;border:0;border-bottom:1px solid #ced4da;padding-left:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i[_ngcontent-%COMP%]{font-size:16px;top:10.6px;left:13px}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]{transition:.4s}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(1){-webkit-transform:rotate(-45deg) translate(-8px,4px);transform:rotate(-45deg) translate(-8px,4px)}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(2){opacity:0}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(45deg) translate(-5px,0px);transform:rotate(45deg) translate(-5px)}.mobile-button[_ngcontent-%COMP%]{display:none}@media (max-width: 990px){.mobile-button[_ngcontent-%COMP%]{display:block}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.more-actions[_ngcontent-%COMP%] div.d-flex[_ngcontent-%COMP%]{width:30rem}"]})};export{Rn as EstimateV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-ZZGSAFGO.js";import{E as r,Q as o,e as s,ja as a}from"./chunk-UXRO4UFY.js";var l=class i{_destinationOutlet=new s(null);destinationOutlet$=this._destinationOutlet.asObservable().pipe(r(t=>n.IsNotEmpty(t)&&n.IsNotEmpty(t?.ID)),o((t,e)=>JSON.stringify(t)===JSON.stringify(e)));updateDestinationOutlet(t){this._destinationOutlet.next(t)}_items=new s(null);items$=this._items.asObservable().pipe(r(t=>n.IsNotEmpty(t)&&t?.length>0),o((t,e)=>JSON.stringify(t)===JSON.stringify(e)));updateItems(t){this._items.next(t)}resetLowOnStock(){this._destinationOutlet.next(null),this._items.next(null)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=a({token:i,factory:i.\u0275fac,providedIn:"root"})};var u=class i{outletSource=new s(null);outletSource$=this.outletSource.asObservable().pipe(r(t=>n.IsNotEmpty(t)),o((t,e)=>JSON.stringify(t)===JSON.stringify(e)));updateOutletID(t){this.outletSource.next(t)}items=new s(null);items$=this.items.asObservable().pipe(r(t=>n.IsNotEmpty(t)&&t?.length>0),o((t,e)=>JSON.stringify(t)===JSON.stringify(e)));updateItems(t){this.items.next(t)}resetOverOnStock(){this.outletSource.next(null),this.items.next(null)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=a({token:i,factory:i.\u0275fac,providedIn:"root"})};export{l as a,u as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as Q}from"./chunk-
|
|
1
|
+
import{b as Q}from"./chunk-YPOODN5H.js";import"./chunk-SIRUW7U2.js";import{d as ce,e as se}from"./chunk-IC3DZAMU.js";import"./chunk-YPFMEFOD.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-DLONNLPI.js";import"./chunk-YEDKRNXU.js";import"./chunk-T2IJ4MCB.js";import"./chunk-7QWJJPNG.js";import"./chunk-VHAM2DWK.js";import{a as le,b as me}from"./chunk-HMER2IC5.js";import{b as te}from"./chunk-JUT3PXG2.js";import{a as X}from"./chunk-D5K5VZVN.js";import"./chunk-MGQ5I7BK.js";import{a as ne}from"./chunk-XZR3IMWZ.js";import{e as re,f as pe}from"./chunk-ADE4IPMV.js";import"./chunk-LO3FAFDO.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-MUJ6277G.js";import"./chunk-RK5QSVFP.js";import{b as ie}from"./chunk-KGLFSTLG.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-EFDAS2KA.js";import"./chunk-JOXTERIM.js";import{G as ae,N as oe}from"./chunk-46DETXA6.js";import{d as $,e as ee}from"./chunk-XYB3YDKL.js";import{g as Z}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as U,h as q,o as K}from"./chunk-RVXZOIFQ.js";import"./chunk-OZ5JEMRA.js";import"./chunk-4E2KYPJT.js";import{d as z}from"./chunk-ZZGSAFGO.js";import"./chunk-YAWVVMMS.js";import{$a as p,Bc as v,Eb as V,Fc as O,Gb as L,Hb as A,Ib as n,Jb as i,Kb as F,Kc as j,Lb as y,Mb as h,Ob as D,Qb as I,Rb as m,Rd as R,Td as H,Vd as J,Yd as Y,Zc as B,db as C,ec as l,fc as x,jc as _,jd as N,kb as E,kc as d,lc as u,na as w,ob as P,qb as f,qc as W,rc as k,va as s,vb as c,wa as g,wd as G,zc as b}from"./chunk-UXRO4UFY.js";import{a as T,b as M}from"./chunk-7DCB7DB2.js";var de=()=>["/menu/Contacts/Contact/Customers/Info"],ue=o=>({ID:o});function Se(o,S){if(o&1){let e=D();n(0,"button",9),I("click",function(){s(e);let t=m(2);return g(t.openExportModal())}),F(1,"i",10),l(2," Export "),i()}}function Ce(o,S){if(o&1){let e=D();n(0,"div")(1,"div",11)(2,"h6"),l(3,"Status"),i(),n(4,"ng-select",12),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.contactState,t)||(a.contactState=t),g(t)}),i(),n(5,"h6"),l(6,"Outlet Sign Up"),i(),n(7,"ng-select",13),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.CreatorEntityID,t)||(a.pageData.Filter.CreatorEntityID=t),g(t)}),i(),n(8,"h6"),l(9,"Group"),i(),n(10,"ng-select",14),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.GroupID,t)||(a.pageData.Filter.GroupID=t),g(t)}),i(),n(11,"h6"),l(12,"Join Date Range"),i(),n(13,"div")(14,"datepicker",15),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.From,t)||(a.pageData.Filter.From=t),g(t)}),i()(),n(15,"div",16)(16,"datepicker",17),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.To,t)||(a.pageData.Filter.To=t),g(t)}),i()(),n(17,"h6"),l(18,"Sign In Date Range"),i(),n(19,"div")(20,"datepicker",15),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.SignFrom,t)||(a.pageData.Filter.SignFrom=t),g(t)}),i()(),n(21,"div",16)(22,"datepicker",17),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.SignTo,t)||(a.pageData.Filter.SignTo=t),g(t)}),i()()()()}if(o&2){let e=m(2);p(4),_("ngModel",e.contactState),c("items",e.pageData.Options.ContactStates)("clearable",!1),p(3),_("ngModel",e.pageData.Filter.CreatorEntityID),c("items",e.pageData.Options.Entities),p(3),_("ngModel",e.pageData.Filter.GroupID),c("items",e.pageData.Options.Groups),p(4),c("isFloatingLabel",!1),_("date",e.pageData.Filter.From),p(2),c("isFloatingLabel",!1),_("date",e.pageData.Filter.To),p(4),c("isFloatingLabel",!1),_("date",e.pageData.Filter.SignFrom),p(2),c("isFloatingLabel",!1),_("date",e.pageData.Filter.SignTo)}}function xe(o,S){if(o&1&&(n(0,"tr")(1,"th")(2,"a",28),l(3),i()(),n(4,"td"),l(5),i(),n(6,"td"),l(7),i(),n(8,"td"),l(9),i(),n(10,"td"),l(11),b(12,"IsMinDate"),i(),n(13,"td"),l(14),b(15,"IsMinDate"),i()()),o&2){let e=S.$implicit;p(2),c("routerLink",W(14,de))("queryParams",k(15,ue,e.ID)),p(),x(e.Name),p(2),x(e.Code),p(2),x(e.Mobile),p(2),x(e.Email),p(2),x(v(12,8,e.JoinDate,"dd MMM yyyy")),p(3),x(v(15,11,e.AppLastSignIn,"dd MMM yyyy HH:mm"))}}function fe(o,S){if(o&1){let e=D();n(0,"div",29)(1,"POS-complex-pagination",30),I("jumpToPage",function(){s(e);let t=m(3);return g(t.getListData())})("previousPage",function(){s(e);let t=m(3);return g(t.getListData())})("nextPage",function(){s(e);let t=m(3);return g(t.getListData())}),i()()}if(o&2){let e=m(3);p(),c("total",e.data.Data.length)("pageData",e.pageData)}}function De(o,S){if(o&1&&(y(0,18),n(1,"div",19)(2,"div",20)(3,"table",21)(4,"thead",22)(5,"tr",23)(6,"th"),l(7,"Name"),i(),n(8,"th",24),l(9,"Code"),i(),n(10,"th",24),l(11,"Mobile"),i(),n(12,"th",25),l(13,"Email"),i(),n(14,"th",26),l(15,"Join Date"),i(),n(16,"th",24),l(17,"Last Sign In"),i()()(),n(18,"tbody"),L(19,xe,16,17,"tr",null,V),i()()(),f(21,fe,2,2,"div",27),i(),h()),o&2){let e=m(2);p(19),A(e.data.Data),p(2),c("ngIf",e.pageData.Filter)}}function ye(o,S){if(o&1){let e=D();n(0,"mainpanel-cmp",2),u("textChange",function(t){s(e);let a=m();return d(a.pageData.Filter.Text,t)||(a.pageData.Filter.Text=t),g(t)}),I("onSubmit",function(){s(e);let t=m();return g(t.searchFromPageOne())}),u("filterChange",function(t){s(e);let a=m();return d(a.pageData.Filter,t)||(a.pageData.Filter=t),g(t)}),y(1,3),n(2,"a",4),F(3,"i",5),l(4,"Get Your Brand Loyalty App "),i(),f(5,Se,3,0,"button",6),h(),y(6,7),f(7,Ce,23,15,"ng-template",null,0,O),h(),f(9,De,22,1,"ng-container",8),i()}if(o&2){let e=m();c("pageData",e.menuData),_("text",e.pageData.Filter.Text),c("isFilterOnDropdown",!1),_("filter",e.pageData.Filter),p(5),c("ngIf",e.role.global.Export),p(4),c("ngIf",e.data&&e.data.Data)}}var ge=class o extends X{constructor(e,r,t,a,_e,he){super(e,r,"Contact/CustomerAppSignInList","ContactLoader/CustomerList",_e);this.httpService=r;this.csvConverter=t;this.matDialog=a;this.role=he}cdr=w(j);title=w(G);contactState;ngOnInit(){let e=JSON.parse(localStorage.getItem("AccountInfo"));this.title.setTitle(e.BrandName+" POS | App Sign In")}postInit(e){this.menuData.H="App Sign In",this.cdr.markForCheck()}preInitList(){this.contactState=this.pageData.Filter.ContactStateID,this.pageData.Options.ContactStates=[{Key:0,Value:"All"},...this.pageData.Options.ContactStates],this.pageData.Filter=M(T({},this.pageData.Filter),{SignFrom:this.pageData.Filter.SignFrom?this.pageData.Filter.SignFrom:"0001-01-01T00:00:00",SignTo:this.pageData.Filter.SignTo?this.pageData.Filter.SignTo:"0001-01-01T00:00:00"})}openExportModal(){this.matDialog.open(te,{data:{title:"Loyalty App Last Sign In",exportTypes:[{ID:"ContactExport/LoyaltyLastSignIn",Value:"Default",FileName:"LoyaltyAppLastSignIn"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}preGetList(){this.pageData.Filter.ContactStateID=this.contactState==0?null:this.contactState}static \u0275fac=function(r){return new(r||o)(C(ie),C(Y),C(ne),C(Z),C(J),C(z))};static \u0275cmp=E({type:o,selectors:[["pos-app-sign-in"]],features:[P],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["ngProjectAs","actions",5,["actions"]],["target","_blank","href","https://www.dealpos.co.id/tour/customer-loyalty-program",1,"btn","btn-outline-secondary"],[1,"fa-solid","fa-mobile","me-1"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"],4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose Status",3,"ngModelChange","ngModel","items","clearable"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet...",3,"ngModelChange","ngModel","items"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Group...",3,"ngModelChange","ngModel","items"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],[2,"width","200px"],[2,"width","100px"],["class","mt-2",4,"ngIf"],[1,"fw-normal",3,"routerLink","queryParams"],[1,"mt-2"],["api","Contact/CustomerAppSignInCount",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(r,t){r&1&&f(0,ye,10,6,"mainpanel-cmp",1),r&2&&c("ngIf",t.pageData.Filter)},dependencies:[pe,re,se,ce,N,B,U,q,K,H,R,Q,ee,$,me,le,oe,ae],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{ge as AppSignInComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-JXJUXV43.js";import{N as D,g as V,o as y,p as z,q as b,y as F}from"./chunk-4SOJX57D.js";import{$a as n,Ab as S,Ac as g,Bb as N,Bc as C,Ib as r,Jb as a,Kb as p,Rb as m,Va as d,Xa as k,Yc as A,Zc as x,ec as _,ed as E,fc as v,gc as f,gd as O,hc as u,jd as w,ka as h,kb as P,lb as T,qb as s,ub as H,vb as i,zc as c}from"./chunk-DJOHANFC.js";function U(e,o){if(e&1&&(r(0,"div",4),_(1),c(2,"DecimalRound"),c(3,"TrailingZero"),a()),e&2){let t=m(2);n(),f(" ",C(3,4,C(2,1,(1-t.item.Discount/100)*t.item.Price*t.item.Quantity*t.item.UnitQuantity,4),t.decimal)," ")}}function $(e,o){if(e&1&&(r(0,"div",2)(1,"div"),_(2),c(3,"number"),r(4,"span"),_(5),a(),r(6,"i"),_(7),a()(),s(8,U,4,7,"div",3),a()),e&2){let t=m();S("d-flex justify-content-between ms-2 ",t.item.Quantity<0?"cancel":"",""),n(2),f(" ",g(3,8,t.item.Quantity)," x "),n(3),u(" ",t.item.Variant==null?null:t.item.Variant.Name," ",t.item.Variant!=null&&t.item.Variant.Code&&t.code?" - "+(t.item.Variant==null?null:t.item.Variant.Code):""," "),n(2),v(t.amount&&t.item.Discount!=0?t.item.Discount+" %":""),n(),i("ngIf",t.amount)}}function X(e,o){if(e&1&&(p(0,"mark",5),c(1,"newlines")),e&2){let t=m();i("innerHtml",g(1,1,t.item.Note),d)}}var M=class e{item;decimal;code;amount;note;constructor(){}ngOnInit(){}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=P({type:e,selectors:[["park-item"]],inputs:{item:"item",decimal:"decimal",code:"code",amount:"amount",note:"note"},standalone:!1,decls:2,vars:2,consts:[["style","font-family:Arial, Helvetica, sans-serif !important;",3,"class",4,"ngIf"],[3,"innerHtml",4,"ngIf"],[2,"font-family","Arial, Helvetica, sans-serif !important"],["class","text-start",4,"ngIf"],[1,"text-start"],[3,"innerHtml"]],template:function(t,l){t&1&&s(0,$,9,10,"div",0)(1,X,2,3,"mark",1),t&2&&(i("ngIf",l.item),n(),i("ngIf",l.item.Note&&l.note))},dependencies:[x,O,y,b,z],encapsulation:2})};function q(e,o){if(e&1&&p(0,"div",18),e&2){let t=m(2);i("innerHtml",t.printTemplate.Field,d)}}function J(e,o){if(e&1&&(r(0,"div",19),p(1,"div",12),c(2,"newlines"),p(3,"div",12),c(4,"newlines"),a()),e&2){let t=m(2);n(),i("innerHtml",g(2,2,t.printTemplate==null?null:t.printTemplate.Address),d),n(2),i("innerHtml",g(4,4,t.printTemplate==null?null:t.printTemplate.ContactInfo),d)}}function K(e,o){if(e&1&&p(0,"h3",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.Name,d)}}function W(e,o){if(e&1&&p(0,"h3",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.MemberIdentification,d)}}function Y(e,o){if(e&1&&(p(0,"p",12),c(1,"newlines")),e&2){let t=m(3);i("innerHtml",g(1,1,t.data==null?null:t.data.Customer.Address),d)}}function tt(e,o){if(e&1&&p(0,"span",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.Phone,d)}}function et(e,o){if(e&1&&p(0,"span",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.Email,d)}}function nt(e,o){if(e&1&&(r(0,"div",19),s(1,K,1,1,"h3",20)(2,W,1,1,"h3",20)(3,Y,2,3,"p",20)(4,tt,1,1,"span",20)(5,et,1,1,"span",20),a()),e&2){let t=m(2);n(),i("ngIf",t.data==null?null:t.data.Customer.Name),n(),i("ngIf",t.data==null?null:t.data.Customer.MemberIdentification),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerAddressVisible),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility!==1),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerEmailVisible)}}function it(e,o){if(e&1&&(r(0,"div"),_(1),a()),e&2){let t=m(2);n(),f(" ",t.data==null?null:t.data.Title," ")}}function ot(e,o){if(e&1&&(r(0,"div",24),p(1,"park-item",25),a()),e&2){let t=o.$implicit,l=m(3);n(),i("item",t)("code",l.config.PrintConfigInvoice.ItemsTable.CodeVisible)("decimal",l.config.PrintConfigGeneral.TrailingZero)("amount",l.config.ApplicationParkAndRetrieve.PrintOutput.AmountVisible)("note",l.config.PrintConfigInvoice.Footer.NoteVisible)}}function rt(e,o){if(e&1&&(r(0,"div",21)(1,"h6",22),_(2),a(),s(3,ot,2,5,"div",23),a()),e&2){let t=o.$implicit;n(2),f(" ",t.Name," "),n(),i("ngForOf",t.Items)}}function at(e,o){if(e&1&&(r(0,"div",28),p(1,"park-item",25),a()),e&2){let t=o.$implicit,l=m(3);n(),i("item",t)("code",l.config.PrintConfigInvoice.ItemsTable.CodeVisible)("decimal",l.config.PrintConfigGeneral.TrailingZero)("amount",l.config.ApplicationParkAndRetrieve.PrintOutput.AmountVisible)("note",l.config.PrintConfigInvoice.Footer.NoteVisible)}}function lt(e,o){if(e&1&&(r(0,"div",26),s(1,at,2,5,"div",27),a()),e&2){let t=m(2);n(),i("ngForOf",t.data.Items)}}function mt(e,o){if(e&1&&(r(0,"tr")(1,"th",34),_(2),c(3,"sum"),c(4,"number"),a(),r(5,"td",35),_(6,":"),a(),r(7,"td",35),_(8),a(),r(9,"td",36),_(10),c(11,"TrailingZero"),a()()),e&2){let t=o.$implicit,l=o.index,I=m(4);n(2),u(" ",l==1&&I.data.Items.length>1?"Qty: "+g(4,7,C(3,4,I.data.Items,"Quantity")):""," ",t.Label," "),n(6),v(t.CurrencySymbol),n(2),f(" ",C(11,9,t.Amount,I.config.PrintConfigGeneral.TrailingZero)," ")}}function pt(e,o){if(e&1&&(r(0,"div",31)(1,"table",32)(2,"tbody"),s(3,mt,12,12,"tr",33),a()()()),e&2){let t=m(3);n(3),i("ngForOf",t.data.AmountSummary)}}function ct(e,o){e&1&&p(0,"div",31)}function dt(e,o){if(e&1&&(r(0,"div",29),s(1,pt,4,1,"div",30)(2,ct,1,0,"div",30),a()),e&2){let t=m(2);n(),i("ngIf",t.data.AmountSummary.length>0),n(),i("ngIf",t.data.AmountSummary.length>0)}}function st(e,o){if(e&1&&(r(0,"div"),_(1),c(2,"number"),a()),e&2){let t=m(2);n(),f(" Number of Person: ",g(2,1,t.data.NumberOfPerson)," ")}}function _t(e,o){if(e&1&&(r(0,"div"),_(1),a()),e&2){let t=m(2);n(),u(" ",t.config.PrintConfigInvoice.DocumentLabel.SalesPerson," : ",t.data.SalesName," ")}}function gt(e,o){e&1&&(r(0,"h6",37),_(1," Note : "),a())}function ft(e,o){if(e&1&&(p(0,"div",38),c(1,"newlines")),e&2){let t=m(2);i("innerHTML",g(1,1,t.data.InvoiceNote),d)}}function Ct(e,o){if(e&1&&p(0,"small",39),e&2){let t=m(2);i("innerHtml",t.data.Creator,d)}}function vt(e,o){if(e&1&&(r(0,"div"),p(1,"div",2),s(2,q,1,1,"div",3)(3,J,5,6,"div",4)(4,nt,6,5,"div",4),r(5,"div",5),s(6,it,2,1,"div",6),r(7,"div"),_(8),a()(),r(9,"div",7),s(10,rt,4,2,"div",8)(11,lt,2,1,"div",9),a(),s(12,dt,3,2,"div",10),r(13,"div",11),s(14,st,3,3,"div",6)(15,_t,2,2,"div",6),p(16,"div",12),c(17,"newlines"),s(18,gt,2,0,"h6",13)(19,ft,2,3,"div",14),a(),p(20,"div",15),c(21,"SafeHtml"),p(22,"small",16),c(23,"date"),s(24,Ct,1,1,"small",17),a()),e&2){let t=m();N("print_container sales_order_mini ",t.printTemplate.PrintLX300?"lx300":""," ",t.printTemplate.CssClass,""),n(),i("innerHtml",t.printTemplate==null?null:t.printTemplate.Title,d),n(),i("ngIf",t.config.ApplicationParkAndRetrieve.PrintOutput.OutletAddressVisible),n(),i("ngIf",t.config.ApplicationParkAndRetrieve.PrintOutput.OutletAddressVisible),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerVisible&&t.data.Customer),n(2),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.NumberVisible),n(2),v(t.data==null?null:t.data.Date),n(2),i("ngForOf",t.itembyCategory),n(),i("ngIf",!t.config.ApplicationParkAndRetrieve.PrintOutput.GroupByCategory),n(),i("ngIf",t.data.AmountSummary),n(2),i("ngIf",t.data.NumberOfPerson&&t.config.ApplicationParkAndRetrieve.PrintOutput.ShowNumberOfPerson),n(),i("ngIf",t.data.SalesName),n(),i("innerHtml",g(17,21,t.data==null?null:t.data.ExtraNote),d),n(2),i("ngIf",t.data.InvoiceNote&&t.config.PrintConfigInvoice.Footer.NoteVisible),n(),i("ngIf",t.data.InvoiceNote&&t.config.PrintConfigInvoice.Footer.NoteVisible),n(),i("innerHtml",g(21,23,t.printTemplate.FooterRight?t.printTemplate.FooterRight:""),d),n(2),i("innerHtml",C(23,25,t.data.PrintDate,"dd MMM yyyy HH:mm"),d),n(2),i("ngIf",t.config.PrintConfigInvoice.Footer.CreatorVisiblePosition!=1)}}var R=class e{data;printTemplate;config;stylesheet;itembyCategory=[];ngOnInit(){this.config.ApplicationParkAndRetrieve.PrintOutput.GroupByCategory&&this.data.Items.forEach(o=>{let t=this.itembyCategory.find(l=>l.Name==o.Variant.CategoryName);t==null&&(t={},t.Name=o.Variant.CategoryName,t.Items=this.data.Items.filter(l=>l.Variant.CategoryName==t.Name),this.itembyCategory.push(t))})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=P({type:e,selectors:[["park-order"]],inputs:{data:"data",printTemplate:"printTemplate",config:"config",stylesheet:"stylesheet"},standalone:!1,decls:3,vars:4,consts:[["rel","stylesheet"],[3,"class",4,"ngIf"],[1,"text-center","invoiceHeader","h1",3,"innerHtml"],["class","text-center",3,"innerHtml",4,"ngIf"],["class","d-block text-center",4,"ngIf"],[1,"d-flex","justify-content-between"],[4,"ngIf"],[1,"park-items"],["class","border border-dark p-0 pe-1 mt-4 border-bottom",4,"ngFor","ngForOf"],["class","border-bottom border-dark",4,"ngIf"],["class","row",4,"ngIf"],[1,"text-center"],[3,"innerHtml"],["class","m-0 fw-bold",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[1,"note",3,"innerHtml"],[1,"d-flex","justify-content-center",3,"innerHtml"],["class","d-flex justify-content-center fw-bold",3,"innerHtml",4,"ngIf"],[1,"text-center",3,"innerHtml"],[1,"d-block","text-center"],[3,"innerHtml",4,"ngIf"],[1,"border","border-dark","p-0","pe-1","mt-4","border-bottom"],[1,"text-center",2,"font-size","12px !important"],["style","font-size: 10px !important",4,"ngFor","ngForOf"],[2,"font-size","10px !important"],[3,"item","code","decimal","amount","note"],[1,"border-bottom","border-dark"],["class","border-top border-dark p-0 pt-1 pe-1",4,"ngFor","ngForOf"],[1,"border-top","border-dark","p-0","pt-1","pe-1"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"col-md-12"],[1,"table","table-borderless","table-sm","float-end","border-bottom","border-dark"],[4,"ngFor","ngForOf"],[1,"text-end"],[2,"width","10px"],[1,"text-end",2,"width","80px"],[1,"m-0","fw-bold"],[3,"innerHTML"],[1,"d-flex","justify-content-center","fw-bold",3,"innerHtml"]],template:function(t,l){t&1&&(p(0,"link",0),c(1,"StylesheetSafeUrl"),s(2,vt,25,28,"div",1)),t&2&&(H("href",l.stylesheet!=null&&l.stylesheet.Size8cm?g(1,2,l.stylesheet==null?null:l.stylesheet.Size8cm):null,k),n(2),i("ngIf",l.data))},dependencies:()=>[A,x,M,O,E,V,y,b,F,B],styles:[".invoice_mini[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%]{width:264px;margin:auto;padding:0 4px;color:#000;font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%]{color:red!important}.invoice_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%]{padding:5px 0;border-top:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%]{border-top:1px solid #888;border-bottom:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%]{margin:0 0 0 auto}.invoice_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%]{font-size:11px!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:.4375rem;padding:.4375rem}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:220px}.box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:170px;height:140px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;display:block;width:204px;padding:42px 31px;background-color:#3498db;box-shadow:0 5px 10px #0000001a;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center;font-size:9px;line-height:17px}.ribbon-content[_ngcontent-%COMP%]{top:-10px;left:-45px}div.ribbon-content[_ngcontent-%COMP%]{right:47px;top:47px;transform:rotate(-45deg)}.invoice_mini.lx300[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%]{margin:0 0 0 20px!important;width:520px!important;letter-spacing:3px!important}.invoice_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{letter-spacing:8px!important}@media print{print-mode[_ngcontent-%COMP%]{display:none;visibility:hidden;height:0px}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background-color:none!important;color:#000;opacity:.7;border-style:dotted none}.ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:after, .ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:before{display:none}.sales_order_mini[_ngcontent-%COMP%] > .invoiceHeader[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{font-family:Arial,Helvetica,sans-serif!important}.toast[_ngcontent-%COMP%]{display:none!important}}"]})},j=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=T({type:e});static \u0275inj=h({imports:[w,D]})};export{R as a,j as b};
|
|
1
|
+
import{a as B}from"./chunk-4HEESH5A.js";import{N as D,g as V,o as y,p as z,q as b,y as F}from"./chunk-46DETXA6.js";import{$a as n,Ab as S,Ac as g,Bb as N,Bc as C,Ib as r,Jb as a,Kb as p,Rb as m,Va as d,Xa as k,Yc as A,Zc as x,ec as _,ed as E,fc as v,gc as f,gd as O,hc as u,jd as w,ka as h,kb as P,lb as T,qb as s,ub as H,vb as i,zc as c}from"./chunk-UXRO4UFY.js";function U(e,o){if(e&1&&(r(0,"div",4),_(1),c(2,"DecimalRound"),c(3,"TrailingZero"),a()),e&2){let t=m(2);n(),f(" ",C(3,4,C(2,1,(1-t.item.Discount/100)*t.item.Price*t.item.Quantity*t.item.UnitQuantity,4),t.decimal)," ")}}function $(e,o){if(e&1&&(r(0,"div",2)(1,"div"),_(2),c(3,"number"),r(4,"span"),_(5),a(),r(6,"i"),_(7),a()(),s(8,U,4,7,"div",3),a()),e&2){let t=m();S("d-flex justify-content-between ms-2 ",t.item.Quantity<0?"cancel":"",""),n(2),f(" ",g(3,8,t.item.Quantity)," x "),n(3),u(" ",t.item.Variant==null?null:t.item.Variant.Name," ",t.item.Variant!=null&&t.item.Variant.Code&&t.code?" - "+(t.item.Variant==null?null:t.item.Variant.Code):""," "),n(2),v(t.amount&&t.item.Discount!=0?t.item.Discount+" %":""),n(),i("ngIf",t.amount)}}function X(e,o){if(e&1&&(p(0,"mark",5),c(1,"newlines")),e&2){let t=m();i("innerHtml",g(1,1,t.item.Note),d)}}var M=class e{item;decimal;code;amount;note;constructor(){}ngOnInit(){}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=P({type:e,selectors:[["park-item"]],inputs:{item:"item",decimal:"decimal",code:"code",amount:"amount",note:"note"},standalone:!1,decls:2,vars:2,consts:[["style","font-family:Arial, Helvetica, sans-serif !important;",3,"class",4,"ngIf"],[3,"innerHtml",4,"ngIf"],[2,"font-family","Arial, Helvetica, sans-serif !important"],["class","text-start",4,"ngIf"],[1,"text-start"],[3,"innerHtml"]],template:function(t,l){t&1&&s(0,$,9,10,"div",0)(1,X,2,3,"mark",1),t&2&&(i("ngIf",l.item),n(),i("ngIf",l.item.Note&&l.note))},dependencies:[x,O,y,b,z],encapsulation:2})};function q(e,o){if(e&1&&p(0,"div",18),e&2){let t=m(2);i("innerHtml",t.printTemplate.Field,d)}}function J(e,o){if(e&1&&(r(0,"div",19),p(1,"div",12),c(2,"newlines"),p(3,"div",12),c(4,"newlines"),a()),e&2){let t=m(2);n(),i("innerHtml",g(2,2,t.printTemplate==null?null:t.printTemplate.Address),d),n(2),i("innerHtml",g(4,4,t.printTemplate==null?null:t.printTemplate.ContactInfo),d)}}function K(e,o){if(e&1&&p(0,"h3",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.Name,d)}}function W(e,o){if(e&1&&p(0,"h3",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.MemberIdentification,d)}}function Y(e,o){if(e&1&&(p(0,"p",12),c(1,"newlines")),e&2){let t=m(3);i("innerHtml",g(1,1,t.data==null?null:t.data.Customer.Address),d)}}function tt(e,o){if(e&1&&p(0,"span",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.Phone,d)}}function et(e,o){if(e&1&&p(0,"span",12),e&2){let t=m(3);i("innerHtml",t.data==null?null:t.data.Customer.Email,d)}}function nt(e,o){if(e&1&&(r(0,"div",19),s(1,K,1,1,"h3",20)(2,W,1,1,"h3",20)(3,Y,2,3,"p",20)(4,tt,1,1,"span",20)(5,et,1,1,"span",20),a()),e&2){let t=m(2);n(),i("ngIf",t.data==null?null:t.data.Customer.Name),n(),i("ngIf",t.data==null?null:t.data.Customer.MemberIdentification),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerAddressVisible),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility!==1),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerEmailVisible)}}function it(e,o){if(e&1&&(r(0,"div"),_(1),a()),e&2){let t=m(2);n(),f(" ",t.data==null?null:t.data.Title," ")}}function ot(e,o){if(e&1&&(r(0,"div",24),p(1,"park-item",25),a()),e&2){let t=o.$implicit,l=m(3);n(),i("item",t)("code",l.config.PrintConfigInvoice.ItemsTable.CodeVisible)("decimal",l.config.PrintConfigGeneral.TrailingZero)("amount",l.config.ApplicationParkAndRetrieve.PrintOutput.AmountVisible)("note",l.config.PrintConfigInvoice.Footer.NoteVisible)}}function rt(e,o){if(e&1&&(r(0,"div",21)(1,"h6",22),_(2),a(),s(3,ot,2,5,"div",23),a()),e&2){let t=o.$implicit;n(2),f(" ",t.Name," "),n(),i("ngForOf",t.Items)}}function at(e,o){if(e&1&&(r(0,"div",28),p(1,"park-item",25),a()),e&2){let t=o.$implicit,l=m(3);n(),i("item",t)("code",l.config.PrintConfigInvoice.ItemsTable.CodeVisible)("decimal",l.config.PrintConfigGeneral.TrailingZero)("amount",l.config.ApplicationParkAndRetrieve.PrintOutput.AmountVisible)("note",l.config.PrintConfigInvoice.Footer.NoteVisible)}}function lt(e,o){if(e&1&&(r(0,"div",26),s(1,at,2,5,"div",27),a()),e&2){let t=m(2);n(),i("ngForOf",t.data.Items)}}function mt(e,o){if(e&1&&(r(0,"tr")(1,"th",34),_(2),c(3,"sum"),c(4,"number"),a(),r(5,"td",35),_(6,":"),a(),r(7,"td",35),_(8),a(),r(9,"td",36),_(10),c(11,"TrailingZero"),a()()),e&2){let t=o.$implicit,l=o.index,I=m(4);n(2),u(" ",l==1&&I.data.Items.length>1?"Qty: "+g(4,7,C(3,4,I.data.Items,"Quantity")):""," ",t.Label," "),n(6),v(t.CurrencySymbol),n(2),f(" ",C(11,9,t.Amount,I.config.PrintConfigGeneral.TrailingZero)," ")}}function pt(e,o){if(e&1&&(r(0,"div",31)(1,"table",32)(2,"tbody"),s(3,mt,12,12,"tr",33),a()()()),e&2){let t=m(3);n(3),i("ngForOf",t.data.AmountSummary)}}function ct(e,o){e&1&&p(0,"div",31)}function dt(e,o){if(e&1&&(r(0,"div",29),s(1,pt,4,1,"div",30)(2,ct,1,0,"div",30),a()),e&2){let t=m(2);n(),i("ngIf",t.data.AmountSummary.length>0),n(),i("ngIf",t.data.AmountSummary.length>0)}}function st(e,o){if(e&1&&(r(0,"div"),_(1),c(2,"number"),a()),e&2){let t=m(2);n(),f(" Number of Person: ",g(2,1,t.data.NumberOfPerson)," ")}}function _t(e,o){if(e&1&&(r(0,"div"),_(1),a()),e&2){let t=m(2);n(),u(" ",t.config.PrintConfigInvoice.DocumentLabel.SalesPerson," : ",t.data.SalesName," ")}}function gt(e,o){e&1&&(r(0,"h6",37),_(1," Note : "),a())}function ft(e,o){if(e&1&&(p(0,"div",38),c(1,"newlines")),e&2){let t=m(2);i("innerHTML",g(1,1,t.data.InvoiceNote),d)}}function Ct(e,o){if(e&1&&p(0,"small",39),e&2){let t=m(2);i("innerHtml",t.data.Creator,d)}}function vt(e,o){if(e&1&&(r(0,"div"),p(1,"div",2),s(2,q,1,1,"div",3)(3,J,5,6,"div",4)(4,nt,6,5,"div",4),r(5,"div",5),s(6,it,2,1,"div",6),r(7,"div"),_(8),a()(),r(9,"div",7),s(10,rt,4,2,"div",8)(11,lt,2,1,"div",9),a(),s(12,dt,3,2,"div",10),r(13,"div",11),s(14,st,3,3,"div",6)(15,_t,2,2,"div",6),p(16,"div",12),c(17,"newlines"),s(18,gt,2,0,"h6",13)(19,ft,2,3,"div",14),a(),p(20,"div",15),c(21,"SafeHtml"),p(22,"small",16),c(23,"date"),s(24,Ct,1,1,"small",17),a()),e&2){let t=m();N("print_container sales_order_mini ",t.printTemplate.PrintLX300?"lx300":""," ",t.printTemplate.CssClass,""),n(),i("innerHtml",t.printTemplate==null?null:t.printTemplate.Title,d),n(),i("ngIf",t.config.ApplicationParkAndRetrieve.PrintOutput.OutletAddressVisible),n(),i("ngIf",t.config.ApplicationParkAndRetrieve.PrintOutput.OutletAddressVisible),n(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerVisible&&t.data.Customer),n(2),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.NumberVisible),n(2),v(t.data==null?null:t.data.Date),n(2),i("ngForOf",t.itembyCategory),n(),i("ngIf",!t.config.ApplicationParkAndRetrieve.PrintOutput.GroupByCategory),n(),i("ngIf",t.data.AmountSummary),n(2),i("ngIf",t.data.NumberOfPerson&&t.config.ApplicationParkAndRetrieve.PrintOutput.ShowNumberOfPerson),n(),i("ngIf",t.data.SalesName),n(),i("innerHtml",g(17,21,t.data==null?null:t.data.ExtraNote),d),n(2),i("ngIf",t.data.InvoiceNote&&t.config.PrintConfigInvoice.Footer.NoteVisible),n(),i("ngIf",t.data.InvoiceNote&&t.config.PrintConfigInvoice.Footer.NoteVisible),n(),i("innerHtml",g(21,23,t.printTemplate.FooterRight?t.printTemplate.FooterRight:""),d),n(2),i("innerHtml",C(23,25,t.data.PrintDate,"dd MMM yyyy HH:mm"),d),n(2),i("ngIf",t.config.PrintConfigInvoice.Footer.CreatorVisiblePosition!=1)}}var R=class e{data;printTemplate;config;stylesheet;itembyCategory=[];ngOnInit(){this.config.ApplicationParkAndRetrieve.PrintOutput.GroupByCategory&&this.data.Items.forEach(o=>{let t=this.itembyCategory.find(l=>l.Name==o.Variant.CategoryName);t==null&&(t={},t.Name=o.Variant.CategoryName,t.Items=this.data.Items.filter(l=>l.Variant.CategoryName==t.Name),this.itembyCategory.push(t))})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=P({type:e,selectors:[["park-order"]],inputs:{data:"data",printTemplate:"printTemplate",config:"config",stylesheet:"stylesheet"},standalone:!1,decls:3,vars:4,consts:[["rel","stylesheet"],[3,"class",4,"ngIf"],[1,"text-center","invoiceHeader","h1",3,"innerHtml"],["class","text-center",3,"innerHtml",4,"ngIf"],["class","d-block text-center",4,"ngIf"],[1,"d-flex","justify-content-between"],[4,"ngIf"],[1,"park-items"],["class","border border-dark p-0 pe-1 mt-4 border-bottom",4,"ngFor","ngForOf"],["class","border-bottom border-dark",4,"ngIf"],["class","row",4,"ngIf"],[1,"text-center"],[3,"innerHtml"],["class","m-0 fw-bold",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[1,"note",3,"innerHtml"],[1,"d-flex","justify-content-center",3,"innerHtml"],["class","d-flex justify-content-center fw-bold",3,"innerHtml",4,"ngIf"],[1,"text-center",3,"innerHtml"],[1,"d-block","text-center"],[3,"innerHtml",4,"ngIf"],[1,"border","border-dark","p-0","pe-1","mt-4","border-bottom"],[1,"text-center",2,"font-size","12px !important"],["style","font-size: 10px !important",4,"ngFor","ngForOf"],[2,"font-size","10px !important"],[3,"item","code","decimal","amount","note"],[1,"border-bottom","border-dark"],["class","border-top border-dark p-0 pt-1 pe-1",4,"ngFor","ngForOf"],[1,"border-top","border-dark","p-0","pt-1","pe-1"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"col-md-12"],[1,"table","table-borderless","table-sm","float-end","border-bottom","border-dark"],[4,"ngFor","ngForOf"],[1,"text-end"],[2,"width","10px"],[1,"text-end",2,"width","80px"],[1,"m-0","fw-bold"],[3,"innerHTML"],[1,"d-flex","justify-content-center","fw-bold",3,"innerHtml"]],template:function(t,l){t&1&&(p(0,"link",0),c(1,"StylesheetSafeUrl"),s(2,vt,25,28,"div",1)),t&2&&(H("href",l.stylesheet!=null&&l.stylesheet.Size8cm?g(1,2,l.stylesheet==null?null:l.stylesheet.Size8cm):null,k),n(2),i("ngIf",l.data))},dependencies:()=>[A,x,M,O,E,V,y,b,F,B],styles:[".invoice_mini[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%]{width:264px;margin:auto;padding:0 4px;color:#000;font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%]{color:red!important}.invoice_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%]{padding:5px 0;border-top:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%]{border-top:1px solid #888;border-bottom:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%]{margin:0 0 0 auto}.invoice_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%]{font-size:11px!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:.4375rem;padding:.4375rem}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:220px}.box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:170px;height:140px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;display:block;width:204px;padding:42px 31px;background-color:#3498db;box-shadow:0 5px 10px #0000001a;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center;font-size:9px;line-height:17px}.ribbon-content[_ngcontent-%COMP%]{top:-10px;left:-45px}div.ribbon-content[_ngcontent-%COMP%]{right:47px;top:47px;transform:rotate(-45deg)}.invoice_mini.lx300[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%]{margin:0 0 0 20px!important;width:520px!important;letter-spacing:3px!important}.invoice_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{letter-spacing:8px!important}@media print{print-mode[_ngcontent-%COMP%]{display:none;visibility:hidden;height:0px}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background-color:none!important;color:#000;opacity:.7;border-style:dotted none}.ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:after, .ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:before{display:none}.sales_order_mini[_ngcontent-%COMP%] > .invoiceHeader[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{font-family:Arial,Helvetica,sans-serif!important}.toast[_ngcontent-%COMP%]{display:none!important}}"]})},j=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=T({type:e});static \u0275inj=h({imports:[w,D]})};export{R as a,j as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-
|
|
1
|
+
import{a as Z}from"./chunk-XKUQPHUA.js";import{d as Y}from"./chunk-IC3DZAMU.js";import{a as H,b as G}from"./chunk-FLCAZ4FS.js";import{c as X}from"./chunk-6CAS42OB.js";import{b as J}from"./chunk-JUT3PXG2.js";import{a as Q}from"./chunk-D5K5VZVN.js";import{e as U}from"./chunk-ADE4IPMV.js";import{b as K}from"./chunk-KGLFSTLG.js";import{g as z}from"./chunk-3YKVLHZG.js";import{h as B,o as j}from"./chunk-RVXZOIFQ.js";import{d as q}from"./chunk-ZZGSAFGO.js";import{$a as l,Bc as v,Fc as V,Ib as i,Jb as r,Kb as R,Ob as x,Od as k,Qb as C,Rb as d,Rd as N,Vd as O,Yc as W,Yd as A,Zc as M,db as y,ec as o,ed as P,fc as w,gc as T,jc as u,kb as L,kc as S,lc as f,ob as E,qb as D,tc as I,va as s,vb as m,wa as c,wc as b,zc as h}from"./chunk-UXRO4UFY.js";var ee=(p,g,t,n,e,a)=>({LogisticServiceID:p,EntityID:g,From:t,To:n,StartTime:e,EndTime:a}),te=(p,g,t)=>({From:p,To:g,LogisticsServiceID:t});function ie(p,g){if(p&1){let t=x();i(0,"button",5),C("click",function(){s(t);let e=d();return c(e.openExportModal())}),R(1,"i",6),o(2," Export "),r()}}function ae(p,g){if(p&1){let t=x();i(0,"div",7)(1,"h6"),o(2,"Outlet"),r(),i(3,"outlet-selector",8),f("ngModelChange",function(e){s(t);let a=d();return S(a.pageData.Filter.EntityID,e)||(a.pageData.Filter.EntityID=e),c(e)}),r(),i(4,"h6"),o(5,"From"),r(),i(6,"datepicker",9),f("dateChange",function(e){s(t);let a=d();return S(a.pageData.Filter.From,e)||(a.pageData.Filter.From=e),c(e)}),r(),i(7,"h6"),o(8,"To"),r(),i(9,"datepicker",10),f("dateChange",function(e){s(t);let a=d();return S(a.pageData.Filter.To,e)||(a.pageData.Filter.To=e),c(e)}),r(),i(10,"h6"),o(11,"Time"),r(),i(12,"div",11)(13,"div",12)(14,"app-timepicker",13),f("timeChange",function(e){s(t);let a=d();return S(a.pageData.Filter.StartTime,e)||(a.pageData.Filter.StartTime=e),c(e)}),r()(),i(15,"div",12)(16,"app-timepicker",13),f("timeChange",function(e){s(t);let a=d();return S(a.pageData.Filter.EndTime,e)||(a.pageData.Filter.EndTime=e),c(e)}),r()()()()}if(p&2){let t=d();l(3),m("accessType",2),u("ngModel",t.pageData.Filter.EntityID),m("outlets",t.pageData.Options==null?null:t.pageData.Options.Entities),l(3),u("date",t.pageData.Filter.From),l(3),u("date",t.pageData.Filter.To),l(5),m("fullWidth",!0),u("time",t.pageData.Filter.StartTime),l(2),m("fullWidth",!0),u("time",t.pageData.Filter.EndTime)}}function re(p,g){if(p&1&&(i(0,"tr")(1,"td"),o(2),r(),i(3,"td"),o(4),r(),i(5,"td",23)(6,"a",24),h(7,"date"),h(8,"date"),o(9),r()(),i(10,"td",23)(11,"a",25),h(12,"date"),h(13,"date"),o(14),r()(),i(15,"td",23),o(16),r()()),p&2){let t=g.$implicit,n=g.index,e=d(2);l(2),w(n+1),l(2),w(t.Name),l(2),m("queryParams",b(19,ee,t.ID,e.pageData.Filter.EntityID,v(7,7,e.pageData.Filter.From,"yyyy-MM-dd"),v(8,10,e.pageData.Filter.To,"yyyy-MM-dd"),e.pageData.Filter.StartTime,e.pageData.Filter.EndTime)),l(3),T(" ",t.Trans," "),l(2),m("queryParams",I(26,te,v(12,13,e.pageData.Filter.From,"yyyy-MM-dd"),v(13,16,e.pageData.Filter.To,"yyyy-MM-dd"),t.ID)),l(3),T(" ",t.Qty," "),l(2),w(t.Weight)}}function ne(p,g){if(p&1){let t=x();i(0,"content")(1,"div",14)(2,"table",15),C("matSortChange",function(e){s(t);let a=d();return c(a.sortData(e))}),i(3,"thead",16)(4,"tr")(5,"th",17),o(6,"No"),r(),i(7,"th"),o(8,"Logistics Service Name"),r(),i(9,"th",18),o(10,"Trans"),r(),i(11,"th",19),o(12,"Qty"),r(),i(13,"th",20),o(14,"Weight "),i(15,"small",21),o(16,"(gram)"),r()()()(),i(17,"tbody"),D(18,re,17,30,"tr",22),r()()()()}if(p&2){let t=d();l(18),m("ngForOf",t.data.Data)}}var $=class p extends Q{constructor(t,n,e,a,F,_){super(t,n,"Report/GetLogisticsService","ReportLoader/GetLogisticsService",e,a);this.matDialog=F;this.roleService=_}originalData=[];postInit(t){this.originalData=t.Data}sortData(t){let n=this.data.Data.slice();if(!t.active||t.direction===""){this.data.Data=this.originalData;return}this.data.Data=n.sort((e,a)=>this.compare(e[t.active],a[t.active],t.direction==="asc"))}openExportModal(){this.matDialog.open(J,{data:{title:"Logistic Service",exportTypes:[{ID:"ReportExport/LogisticService",Value:"Default",FileName:"Logistics Service"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}onChangeTime(t,n){let e=t.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[n]=e}static \u0275fac=function(n){return new(n||p)(y(K),y(A),y(O),y(k),y(z),y(q))};static \u0275cmp=L({type:p,selectors:[["POS-logistics-service-report"]],standalone:!1,features:[E],decls:9,vars:6,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",1,"btn","btn-outline-secondary"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","50px"],["mat-sort-header","Trans",1,"align-right"],["mat-sort-header","Qty",1,"align-right"],["mat-sort-header","Weight",1,"align-right",2,"width","180px"],[1,"fst-italic","text-dark"],[4,"ngFor","ngForOf"],[1,"text-end"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",3,"queryParams"],["routerLink","/menu/Reports/Sales_Report/Standard/Products_Sold",3,"queryParams"]],template:function(n,e){if(n&1){let a=x();i(0,"mainpanel-cmp",1),f("textChange",function(_){return s(a),S(e.pageData.Filter.Name,_)||(e.pageData.Filter.Name=_),c(_)}),C("onSubmit",function(){return s(a),c(e.searchFromPageOne())}),f("filterChange",function(_){return s(a),S(e.pageData.Filter,_)||(e.pageData.Filter=_),c(_)}),i(1,"actions"),D(2,ie,3,0,"button",2),i(3,"a",3),o(4," View Detail "),r()(),i(5,"filters"),D(6,ae,17,9,"ng-template",null,0,V),r(),D(8,ne,19,1,"content",4),r()}n&2&&(m("pageData",e.menuData),u("text",e.pageData.Filter.Name),m("isFilterOnDropdown",!1),u("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(6),m("ngIf",e.data))},dependencies:[W,M,N,B,j,U,Y,H,G,Z,X,P],encapsulation:2})};export{$ as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ae}from"./chunk-XKUQPHUA.js";import"./chunk-Q4CKRRGM.js";import"./chunk-PIYM2FOP.js";import"./chunk-2OWHEMAL.js";import"./chunk-XZELBTQR.js";import{a as oe,b as le}from"./chunk-MH6ADXRE.js";import"./chunk-4HEESH5A.js";import"./chunk-MPSML3FA.js";import{d as ne,e as re}from"./chunk-IC3DZAMU.js";import"./chunk-YPFMEFOD.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-DLONNLPI.js";import"./chunk-YEDKRNXU.js";import"./chunk-T2IJ4MCB.js";import"./chunk-7QWJJPNG.js";import{e as te}from"./chunk-TVEGYRXE.js";import"./chunk-VHAM2DWK.js";import{c as ie}from"./chunk-6CAS42OB.js";import{a as X}from"./chunk-D5K5VZVN.js";import"./chunk-MGQ5I7BK.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as Q,e as $,f as ee}from"./chunk-ADE4IPMV.js";import"./chunk-5VIFPZ5D.js";import"./chunk-5JJSLRVS.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-RK5QSVFP.js";import{b as Z}from"./chunk-KGLFSTLG.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-EFDAS2KA.js";import"./chunk-JOXTERIM.js";import{O as x}from"./chunk-46DETXA6.js";import{d as Y}from"./chunk-XYB3YDKL.js";import"./chunk-6ZN7JR6K.js";import"./chunk-GIKR6Y2K.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import{a as K}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as z,h as U,o as q}from"./chunk-RVXZOIFQ.js";import"./chunk-OZ5JEMRA.js";import"./chunk-4E2KYPJT.js";import"./chunk-ZZGSAFGO.js";import"./chunk-YAWVVMMS.js";import{$a as s,Ac as I,Db as L,Eb as V,Fc as N,Gb as W,Hb as O,Ib as r,Jb as a,Kb as S,Lb as w,Ma as A,Mb as T,Ob as y,Qb as v,Rb as c,Vd as G,Y as k,Yd as J,Zc as R,cd as H,db as C,ec as u,fa as P,jc as g,jd as j,kb as E,kc as _,lc as f,na as B,ob as M,qb as h,va as p,vb as l,wa as m,zc as b}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";function me(o,d){if(o&1){let t=y();r(0,"button",7),v("click",function(){p(t);let e=c();return m(e.onPrint())}),S(1,"i",8),r(2,"span"),u(3,"Print"),a()()}}function se(o,d){if(o&1){let t=y();r(0,"div",9)(1,"h6"),u(2,"Outlet"),a(),r(3,"outlet-selector",10),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),m(e)}),a(),r(4,"h6"),u(5,"Sales Order Tag"),a(),r(6,"ng-select",11),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),m(e)}),a(),r(7,"h6"),u(8,"From"),a(),r(9,"div",12)(10,"div",13)(11,"datepicker",14),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),m(e)}),a()(),r(12,"div",13)(13,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),m(e)}),a()()(),r(14,"h6"),u(15,"To"),a(),r(16,"div",12)(17,"div",13)(18,"datepicker",16),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),m(e)}),a()(),r(19,"div",13)(20,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),m(e)}),a()()()()}if(o&2){let t=c();s(3),l("accessType",2),g("ngModel",t.pageData.Filter.EntityID),s(3),l("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),s(5),l("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l("hidelClearBtn",!0),s(2),g("time",t.pageData.Filter.StartTime),l("fullWidth",!0),s(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),s(2),g("time",t.pageData.Filter.EndTime),l("fullWidth",!0)}}function ce(o,d){o&1&&(w(0),r(1,"div",20),u(2,"\xA0"),a(),T())}function de(o,d){if(o&1&&(S(0,"pos-receipt-a4",17),r(1,"div",18),S(2,"div",19),a(),h(3,ce,3,0,"ng-container",6)),o&2){let t=d.$implicit,n=d.$index,e=c().ngIf,i=c();l("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),s(3),l("ngIf",n!==(e.Data==null?null:e.Data.length)-1)}}function ue(o,d){if(o&1&&(w(0),W(1,de,4,7,null,null,V),T()),o&2){let t=d.ngIf;s(),O(t.Data)}}var pe=class o extends X{constructor(t,n,e){super(t,n,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=n;this.initPrintListener()}dialogFilter=B(Q);receipts$;printTemplates;invoiceIds=A([]);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(x.GetBulkPrintA4,this.pageData.Filter).pipe(P(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",K.Info):this.generatePrintTemplate(t.PrintTemplates),this.invoiceIds.set(t.Data.map(n=>n?.Invoice?.ID))}),k(1))}generatePrintTemplate(t=[]){this.printTemplates=new Map(t.map(n=>[n.ID,n]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.put(x.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(n){return new(n||o)(C(Z),C(J),C(G))};static \u0275cmp=E({type:o,selectors:[["bulk-invoice-A4"]],features:[M],decls:13,vars:10,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","pageData","hideSearchBox","text","hideSearchDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-success",3,"click"],["filters",""],[1,"container-fluid","mt-5"],[4,"ngIf"],[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","Name","bindValue","ID","placeholder","Choose Sales Order Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[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"],[3,"data","printTemplate","config","workOrderMode","fullMode","stylesheet"],[1,"d-print-none","mt-8"],[2,"border-top-style","dotted","margin-bottom","5px"],[1,"page-break"]],template:function(n,e){if(n&1){let i=y();r(0,"mainpanel-cmp",1),f("textChange",function(D){return p(i),_(e.pageData.Filter.Number,D)||(e.pageData.Filter.Number=D),m(D)}),v("onSubmit",function(){return p(i),m(e.onFilter())}),r(1,"actions"),h(2,me,4,0,"button",2),b(3,"async"),r(4,"button",3),v("click",function(){return p(i),m(e.onNewPrint())}),u(5,"New"),a()(),r(6,"div",4),h(7,se,21,14,"ng-template",null,0,N),a(),r(9,"content")(10,"div",5),h(11,ue,3,0,"ng-container",6),b(12,"async"),a()()()}if(n&2){let i;l("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),l("hideSearchDropdown",!0),s(2),L(((i=I(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),s(9),l("ngIf",I(12,8,e.printTemplates&&e.receipts$))}},dependencies:[j,R,H,le,oe,ee,$,ie,Y,re,ne,te,z,U,q,ae],styles:["input.p-inputtext{height:46.63px;border-color:#0000001f!important} input.p-inputtext :hover{border-color:#0000001f!important}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})};export{pe as BulkInvoiceA4Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ft,b as Ct}from"./chunk-STUDNF4L.js";import{a as _t}from"./chunk-FKDZ5OWB.js";import{a as st}from"./chunk-AAI6JWC5.js";import{a as ut}from"./chunk-BXQFYW4R.js";import"./chunk-AZO64X7U.js";import"./chunk-BYXBJQAS.js";import{d as dt,e as mt}from"./chunk-IC3DZAMU.js";import"./chunk-YPFMEFOD.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-DLONNLPI.js";import"./chunk-YEDKRNXU.js";import"./chunk-T2IJ4MCB.js";import"./chunk-7QWJJPNG.js";import{d as rt,e as lt}from"./chunk-TVEGYRXE.js";import"./chunk-VHAM2DWK.js";import{a as $}from"./chunk-JPXXXD26.js";import{a as X}from"./chunk-PAXXDG73.js";import{b as pt}from"./chunk-HMER2IC5.js";import{f as ct}from"./chunk-MCQ4J3UT.js";import{b as Z}from"./chunk-JUT3PXG2.js";import"./chunk-D5K5VZVN.js";import"./chunk-MGQ5I7BK.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as et}from"./chunk-XZR3IMWZ.js";import{e as ot,f as at}from"./chunk-ADE4IPMV.js";import"./chunk-LO3FAFDO.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-MUJ6277G.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-RK5QSVFP.js";import{b as tt}from"./chunk-KGLFSTLG.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-EFDAS2KA.js";import{b as J,c as U}from"./chunk-JOXTERIM.js";import{N as nt,g as it}from"./chunk-46DETXA6.js";import"./chunk-XYB3YDKL.js";import"./chunk-6ZN7JR6K.js";import"./chunk-GIKR6Y2K.js";import{g as Y}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as z}from"./chunk-RVXZOIFQ.js";import"./chunk-OZ5JEMRA.js";import"./chunk-4E2KYPJT.js";import{d as Q}from"./chunk-ZZGSAFGO.js";import"./chunk-YAWVVMMS.js";import{$a as i,Ac as u,Bc as C,Db as d,Eb as k,Fc as W,Gb as N,Hb as q,Ib as o,Jb as n,Kb as E,Ob as h,Qb as V,Rb as c,Rd as H,Yd as K,Zc as j,db as T,ec as r,fc as P,gc as s,gd as A,jc as g,jd as G,kb as L,kc as I,lc as S,ob as O,qb as v,qc as w,rc as D,ub as M,va as x,vb as _,wa as y,wd as R,zc as p}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";var yt=()=>["/menu/Outlets/Master/Outlets/Info"],b=t=>({ID:t}),vt=()=>["/menu/Products/Catalog/Products/Info"],Tt=()=>["/menu/Products/Catalog/Variants/Info"];function gt(t,l){if(t&1){let e=h();o(0,"button",13),V("click",function(){x(e);let a=c();return y(a.openExportModal())}),E(1,"i",14),r(2," Export "),n()}}function It(t,l){if(t&1){let e=h();o(0,"div",15)(1,"h6"),r(2,"Outlet Group"),n(),o(3,"POS-outlet-group-tree-select",16),S("selectedOutletGroupIDChange",function(a){x(e);let f=c();return I(f.pageData.Filter.OutletGroupID,a)||(f.pageData.Filter.OutletGroupID=a),y(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",17),S("selectedCategoryIDChange",function(a){x(e);let f=c();return I(f.pageData.Filter.CategoryID,a)||(f.pageData.Filter.CategoryID=a),y(a)}),n(),o(7,"autocompleteV3",18),S("modelNameChange",function(a){x(e);let f=c();return I(f.pageData.Filter.ListProductID,a)||(f.pageData.Filter.ListProductID=a),y(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",19),S("dateChange",function(a){x(e);let f=c();return I(f.pageData.Filter.From,a)||(f.pageData.Filter.From=a),y(a)}),n()(),o(12,"div",20)(13,"datepicker",21),S("dateChange",function(a){x(e);let f=c();return I(f.pageData.Filter.To,a)||(f.pageData.Filter.To=a),y(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",22),S("modelChange",function(a){x(e);let f=c();return I(f.pageData.Filter.InventoryType,a)||(f.pageData.Filter.InventoryType=a),y(a)}),n()()}if(t&2){let e=c();i(3),_("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),_("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),_("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Key"),i(4),_("isFloatingLabel",!1),g("date",e.pageData.Filter.From),_("hidelClearBtn",!0),i(2),_("isFloatingLabel",!1),g("date",e.pageData.Filter.To),_("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),_("options",e.pageData.Options.InventoryTypes)}}function St(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," P.Code "),n()())}function ht(t,l){t&1&&(o(0,"th",10),r(1,"Code"),n())}function Vt(t,l){t&1&&(o(0,"th",11),r(1,"Start"),n())}function Ft(t,l){t&1&&(o(0,"th",11),r(1,"Bought"),n())}function Et(t,l){t&1&&(o(0,"th",11),r(1,"Sold"),n())}function wt(t,l){t&1&&(o(0,"th",11),r(1,"T.In"),n())}function Dt(t,l){t&1&&(o(0,"th",11),r(1,"T.Out"),n())}function Pt(t,l){t&1&&(o(0,"th",11),r(1,"Adjust"),n())}function bt(t,l){t&1&&(o(0,"th",11),r(1,"End"),n())}function Bt(t,l){t&1&&(o(0,"th",11),r(1,"Now"),n())}function Lt(t,l){if(t&1&&(o(0,"td"),r(1),n()),t&2){let e=c().$implicit;i(),s(" ",e.ProductCode," ")}}function Ot(t,l){if(t&1&&(o(0,"td",25),r(1),n()),t&2){let e=c().$implicit;i(),s(" ",e.VariantCode," ")}}function Mt(t,l){if(t&1&&(o(0,"td",26),r(1),p(2,"quantityFraction"),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Start),i(),s(" ",u(2,2,e.Start)," ")}}function kt(t,l){if(t&1&&(o(0,"td",27),r(1),p(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.Bought)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",28),r(1),p(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.Sold)," ")}}function qt(t,l){if(t&1&&(o(0,"td",27),r(1),p(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.TransferredIn)," ")}}function Wt(t,l){if(t&1&&(o(0,"td",28),r(1),p(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.TransferredOut)," ")}}function jt(t,l){if(t&1&&(o(0,"td",26),r(1),p(2,"quantityFraction"),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Adjustment),i(),s(" ",e.Adjustment<0?e.Adjustment*-1:u(2,2,e.Adjustment)," ")}}function At(t,l){if(t&1&&(o(0,"td",26),r(1),n()),t&2){let e=c().$implicit;_("colsFontColor",e.End),i(),s(" ",e.End," ")}}function Gt(t,l){if(t&1&&(o(0,"td",26),r(1),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Now),i(),s(" ",e.Now," ")}}function Rt(t,l){if(t&1&&(o(0,"tr")(1,"td")(2,"a",24),r(3),n()(),o(4,"td")(5,"a",24),r(6),n()(),v(7,Lt,2,1,"td"),o(8,"td")(9,"a",24),r(10),n()(),v(11,Ot,2,1,"td",25)(12,Mt,3,4,"td",26)(13,kt,3,3,"td",27)(14,Nt,3,3,"td",28)(15,qt,3,3,"td",27)(16,Wt,3,3,"td",28)(17,jt,3,4,"td",26)(18,At,2,2,"td",26)(19,Gt,2,2,"td",26),n()),t&2){let e=l.$implicit,m=c(2);i(2),_("routerLink",w(19,yt))("queryParams",D(20,b,e.OutletID)),i(),s(" ",e.OutletName," "),i(2),_("routerLink",w(22,vt))("queryParams",D(23,b,e.ProductID)),i(),s(" ",e.ProductName," "),i(),d(m.column.productcode.selected?7:-1),i(2),_("routerLink",w(25,Tt))("queryParams",D(26,b,e.VariantID)),i(),P(e.VariantName),i(),d(m.column.code.selected?11:-1),i(),d(m.column.start.selected?12:-1),i(),d(m.column.bought.selected?13:-1),i(),d(m.column.sold.selected?14:-1),i(),d(m.column.transferredIn.selected?15:-1),i(),d(m.column.transferredOut.selected?16:-1),i(),d(m.column.adjust.selected?17:-1),i(),d(m.column.end.selected?18:-1),i(),d(m.column.now.selected?19:-1)}}function Ht(t,l){if(t&1&&N(0,Rt,20,28,"tr",null,k),t&2){let e=c();q(e.infiniteList)}}function zt(t,l){t&1&&(o(0,"tr")(1,"td",29),E(2,"app-empty-state"),n()())}function Kt(t,l){if(t&1&&(o(0,"td",26),p(1,"sum"),p(2,"quantityFraction"),r(3),p(4,"sum"),p(5,"quantityFraction"),n()),t&2){let e=c(2);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Start"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Start"))," ")}}function Qt(t,l){if(t&1&&(o(0,"td",27),r(1),p(2,"sum"),p(3,"quantityFraction"),n()),t&2){let e=c(2);i(),s(" ",u(3,4,C(2,1,e.infiniteList,"Bought"))," ")}}function Jt(t,l){if(t&1&&(o(0,"td",28),r(1),p(2,"sum"),p(3,"quantityFraction"),n()),t&2){let e=c(2);i(),s(" ",u(3,4,C(2,1,e.infiniteList,"Sold"))," ")}}function Ut(t,l){if(t&1&&(o(0,"td",27),r(1),p(2,"sum"),p(3,"quantityFraction"),n()),t&2){let e=c(2);i(),s(" ",u(3,4,C(2,1,e.infiniteList,"TransferredIn"))," ")}}function Xt(t,l){if(t&1&&(o(0,"td",28),r(1),p(2,"sum"),p(3,"quantityFraction"),n()),t&2){let e=c(2);i(),s(" ",u(3,4,C(2,1,e.infiniteList,"TransferredOut"))," ")}}function Yt(t,l){if(t&1&&(o(0,"td",26),p(1,"sum"),p(2,"quantityFraction"),r(3),p(4,"sum"),p(5,"quantityFraction"),n()),t&2){let e=c(2);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Adjustment"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Adjustment"))," ")}}function Zt(t,l){if(t&1&&(o(0,"td",26),p(1,"sum"),p(2,"quantityFraction"),r(3),p(4,"sum"),p(5,"quantityFraction"),n()),t&2){let e=c(2);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"End"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"End"))," ")}}function $t(t,l){if(t&1&&(o(0,"td",26),p(1,"sum"),p(2,"quantityFraction"),r(3),p(4,"sum"),p(5,"quantityFraction"),n()),t&2){let e=c(2);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Now"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Now"))," ")}}function te(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",30)(2,"th",31),r(3," Total: "),n(),v(4,Kt,6,12,"td",26)(5,Qt,4,6,"td",27)(6,Jt,4,6,"td",28)(7,Ut,4,6,"td",27)(8,Xt,4,6,"td",28)(9,Yt,6,12,"td",26)(10,Zt,6,12,"td",26)(11,$t,6,12,"td",26),n()()),t&2){let e=c();i(2),M("colspan",e.column.code.selected?4:3),i(2),d(e.column.start.selected?4:-1),i(),d(e.column.bought.selected?5:-1),i(),d(e.column.sold.selected?6:-1),i(),d(e.column.transferredIn.selected?7:-1),i(),d(e.column.transferredOut.selected?8:-1),i(),d(e.column.adjust.selected?9:-1),i(),d(e.column.end.selected?10:-1),i(),d(e.column.now.selected?11:-1)}}function ee(t,l){if(t&1){let e=h();o(0,"span",38),V("click",function(){x(e);let a=c(2);return y(a.StoreRowsCountAPIResult("inventory/GetCountVariantInventoryTraffic"))}),o(1,"i",39),r(2,"?"),n()()}}function ie(t,l){if(t&1&&(o(0,"span"),r(1),p(2,"number"),n()),t&2){let e=c(2);i(),P(u(2,1,e.listTotal))}}function ne(t,l){if(t&1){let e=h();o(0,"div",12)(1,"div",32)(2,"div",33),r(3),p(4,"number"),v(5,ee,3,0,"span",34)(6,ie,3,3,"span",35),r(7),n()(),o(8,"a",36),V("click",function(){x(e);let a=c();return y(a.NextPage(!0))}),E(9,"i",37),r(10," Next"),n()()}if(t&2){let e=c();i(3),s(" Showing 1 - ",u(4,4,e.infiniteList.length)," of "),i(2),_("ngIf",!e.pageData.HideStoreApiCount),i(),_("ngIf",e.pageData.HideStoreApiCount),i(),s(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var xt=class t extends X{constructor(e,m,a,f,B,F,oe){super(e,m,"inventory/GetVariantInventoryTraffic","inventoryloader/GetVariantInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=a;this.pageTitle=f;this.converter=B;this.roleService=F;this.matDialog=oe;this.pageTitle.setTitle(this.menuData.T)}column={productcode:{selected:!1,name:"Product Code"},code:{selected:!0,name:"Variant Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{data:{title:"Variant Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportVariantInventoryTraffic",Value:"Default",FileName:"Variant Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(m){return new(m||t)(T(tt),T(K),T(et),T(R),T(_t),T(Q),T(Y))};static \u0275cmp=L({type:t,selectors:[["POS-variant-inventory-traffic"]],features:[O],decls:33,vars:19,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","180px"],[2,"width","150px"],[2,"width","80px"],[1,"text-end",2,"width","130px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","InventoryType",3,"modelChange","model","options"],["matTooltip","Product Code","matTooltipPosition","above"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","9"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(m,a){if(m&1){let f=h();o(0,"mainpanel-cmp",1),V("onSubmit",function(){return x(f),y(a.searchFromPageOne())}),S("filterChange",function(F){return x(f),I(a.pageData.Filter,F)||(a.pageData.Filter=F),y(F)}),o(1,"actions"),v(2,gt,3,0,"button",2),n(),o(3,"filters"),v(4,It,17,20,"ng-template",null,0,W),n(),o(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),o(14,"th",8),r(15,"Product"),n(),v(16,St,3,0,"th",9),o(17,"th"),r(18,"Variant"),n(),v(19,ht,2,0,"th",10)(20,Vt,2,0,"th",11)(21,Ft,2,0,"th",11)(22,Et,2,0,"th",11)(23,wt,2,0,"th",11)(24,Dt,2,0,"th",11)(25,Pt,2,0,"th",11)(26,bt,2,0,"th",11)(27,Bt,2,0,"th",11),n()(),o(28,"tbody"),v(29,Ht,2,0)(30,zt,3,0,"tr"),n(),v(31,te,12,9,"tfoot"),n()(),v(32,ne,11,6,"div",12),n()()()}m&2&&(_("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),_("column",a.column),i(2),_("ngIf",a.roleService.global.Export),i(14),d(a.column.productcode.selected?16:-1),i(3),d(a.column.code.selected?19:-1),i(),d(a.column.start.selected?20:-1),i(),d(a.column.bought.selected?21:-1),i(),d(a.column.sold.selected?22:-1),i(),d(a.column.transferredIn.selected?23:-1),i(),d(a.column.transferredOut.selected?24:-1),i(),d(a.column.adjust.selected?25:-1),i(),d(a.column.end.selected?26:-1),i(),d(a.column.now.selected?27:-1),i(2),d(a.infiniteList&&a.infiniteList.length>0?29:30),i(2),d(a.infiniteList&&a.infiniteList.length>0?31:-1),i(),d(a.infiniteList&&a.infiniteList.length>0?32:-1))},dependencies:[at,ot,G,j,A,z,st,ct,ft,nt,it,H,$,mt,dt,lt,rt,ut,pt,Ct,U,J],encapsulation:2})};export{xt as Variant_Inventory_TrafficComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f}from"./chunk-
|
|
1
|
+
import{c as f}from"./chunk-OZ5JEMRA.js";import{a as m}from"./chunk-YAWVVMMS.js";import{I as c,Vd as v,Yd as u,ja as s,k as n,ma as e,qd as h,td as l}from"./chunk-UXRO4UFY.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as r,ea as n}from"./chunk-
|
|
1
|
+
import{L as r,ea as n}from"./chunk-ZHY3BUQJ.js";import{ka as t,lb as i}from"./chunk-UXRO4UFY.js";var s=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=i({type:e});static \u0275inj=t({imports:[r]})}return e})();var ue=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=i({type:e});static \u0275inj=t({imports:[n,s,n]})}return e})();export{ue as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as c}from"./chunk-
|
|
1
|
+
import{d as c}from"./chunk-3GOO5E5D.js";import{a as R,c as B}from"./chunk-LE3BKIDY.js";import{D as s,N as z,a as h,ea as P,f as $,g as M,h as V,k as n,m as f,q as k,s as g,ua as A}from"./chunk-EEEAUYZ6.js";import{Ga as y,Mc as p,Nc as r,ab as E,db as u,fb as w,ja as m,ka as b,kd as I,lb as x,mb as D,na as L,ob as S,pc as H,ua as T,za as O}from"./chunk-UXRO4UFY.js";import{a}from"./chunk-7DCB7DB2.js";var F=({dt:e})=>`
|
|
2
2
|
.p-tooltip {
|
|
3
3
|
position: absolute;
|
|
4
4
|
display: none;
|