dealpos 25.45.0 → 25.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-Z4NZP4NH.js → chunk-2BSYBLS4.js} +1 -1
- package/browser/{chunk-UARWMJ5H.js → chunk-2JU7KFOZ.js} +1 -1
- package/browser/{chunk-4UJTVSL2.js → chunk-2QD46TNT.js} +1 -1
- package/browser/{chunk-QNJH27F5.js → chunk-33B62QHS.js} +1 -1
- package/browser/{chunk-7NQ56KZ6.js → chunk-3CZ6HKSM.js} +1 -1
- package/browser/{chunk-KHFL6T5N.js → chunk-3LPZYQS6.js} +1 -1
- package/browser/{chunk-B7QNQTF3.js → chunk-3MU2GNGM.js} +1 -1
- package/browser/{chunk-OLC5OIWO.js → chunk-3MUHZKUR.js} +1 -1
- package/browser/{chunk-TKZU227J.js → chunk-3RGQWWNI.js} +1 -1
- package/browser/{chunk-2YGMAT2F.js → chunk-4CFMB4IK.js} +1 -1
- package/browser/chunk-4KBU47GN.js +1 -0
- package/browser/{chunk-G2QZRGKV.js → chunk-4KMN7PSV.js} +1 -1
- package/browser/{chunk-AF5V3BUB.js → chunk-4ZFVM7K7.js} +1 -1
- package/browser/{chunk-LQDIK5ZH.js → chunk-5DXDXIDO.js} +1 -1
- package/browser/{chunk-P3BUVJKX.js → chunk-5I74KDE7.js} +1 -1
- package/browser/{chunk-ODEK2WQO.js → chunk-5PWOYB4R.js} +5 -5
- package/browser/{chunk-EI2XG4ML.js → chunk-5ZU5FBGM.js} +1 -1
- package/browser/{chunk-Q32BQBU5.js → chunk-67UQKMLX.js} +1 -1
- package/browser/{chunk-ZDX5LF2K.js → chunk-6A3BN6JC.js} +1 -1
- package/browser/{chunk-2PIAS2C5.js → chunk-6BGTH62C.js} +1 -1
- package/browser/{chunk-TIBTGPW2.js → chunk-6DRTZA6S.js} +1 -1
- package/browser/{chunk-VJQA5UAH.js → chunk-6Q7J43H4.js} +1 -1
- package/browser/chunk-6VM27TUY.js +1 -0
- package/browser/{chunk-CTPHJSLU.js → chunk-7EVERJPZ.js} +1 -1
- package/browser/{chunk-TEH7D4QV.js → chunk-7FUWLNHK.js} +1 -1
- package/browser/{chunk-M67ULXNR.js → chunk-7IRMDCKA.js} +1 -1
- package/browser/{chunk-WOMVTVEQ.js → chunk-7USHMTB5.js} +1 -1
- package/browser/{chunk-NE57UXZU.js → chunk-A4SCCZAY.js} +1 -1
- package/browser/{chunk-KHDFH3GS.js → chunk-A6F6V3WW.js} +1 -1
- package/browser/{chunk-JHYJTTAR.js → chunk-AASKAWJ4.js} +1 -1
- package/browser/{chunk-7ZTWH3L6.js → chunk-B235RUOX.js} +1 -1
- package/browser/{chunk-WFIKDWZE.js → chunk-B3LNBFJF.js} +1 -1
- package/browser/{chunk-PVSXCHI3.js → chunk-B5ORO5G4.js} +1 -1
- package/browser/{chunk-QOTJ7B7C.js → chunk-B6EKSPI2.js} +1 -1
- package/browser/{chunk-CKRLMZHY.js → chunk-BG6GTLXF.js} +1 -1
- package/browser/chunk-BJG2UU2M.js +1 -0
- package/browser/{chunk-AFCABMLQ.js → chunk-BJKHMXAA.js} +1 -1
- package/browser/{chunk-32GJXDHR.js → chunk-BLQKJ5OK.js} +1 -1
- package/browser/{chunk-NYTOBW2G.js → chunk-BQAKWHPC.js} +1 -1
- package/browser/{chunk-CANN2XN6.js → chunk-BRHHRJLT.js} +1 -1
- package/browser/{chunk-PHWHZQFM.js → chunk-BXGUZIC4.js} +1 -1
- package/browser/chunk-CKGJCUHW.js +1 -0
- package/browser/{chunk-235POOLV.js → chunk-DB3W42KN.js} +1 -1
- package/browser/{chunk-YNRHLKM5.js → chunk-DELGLVJJ.js} +1 -1
- package/browser/chunk-DG4IHOM2.js +1 -0
- package/browser/{chunk-CQPKVO7W.js → chunk-DJNB7COU.js} +1 -1
- package/browser/{chunk-KHDUUG2S.js → chunk-DU7W2G2L.js} +1 -1
- package/browser/{chunk-66DT3BE2.js → chunk-DZA27E5L.js} +1 -1
- package/browser/{chunk-ZRAK4HYU.js → chunk-E2XUBZDW.js} +1 -1
- package/browser/{chunk-V2PGBJHJ.js → chunk-E4GYCB3G.js} +1 -1
- package/browser/{chunk-RJJZC7JC.js → chunk-EAXUIPR5.js} +1 -1
- package/browser/{chunk-62E2JEWQ.js → chunk-EGADVOKH.js} +1 -1
- package/browser/{chunk-YFMVQJRL.js → chunk-EGUIWOC3.js} +1 -1
- package/browser/{chunk-3AHCNKRE.js → chunk-EHXTW46H.js} +1 -1
- package/browser/{chunk-5JQ2TYZU.js → chunk-EIH377TR.js} +1 -1
- package/browser/{chunk-6QKBTWAT.js → chunk-ELTC3POX.js} +1 -1
- package/browser/{chunk-6EP37ICB.js → chunk-EOJJS4LU.js} +1 -1
- package/browser/{chunk-OIMBKUXO.js → chunk-EPINEYFX.js} +1 -1
- package/browser/{chunk-T4K6XBGC.js → chunk-ETTSYVEZ.js} +1 -1
- package/browser/{chunk-WSFK2BTV.js → chunk-F7EO5OHI.js} +1 -1
- package/browser/{chunk-5NRBDWB4.js → chunk-FADT3LJL.js} +1 -1
- package/browser/{chunk-CKN6D7N7.js → chunk-FAGD2TBB.js} +1 -1
- package/browser/{chunk-D7J7CQGT.js → chunk-FAN4YDVT.js} +1 -1
- package/browser/{chunk-HPXDTBZD.js → chunk-FFOK3ZNC.js} +1 -1
- package/browser/{chunk-JKBDSVHR.js → chunk-FR4CH42S.js} +1 -1
- package/browser/{chunk-ZGPKGJBM.js → chunk-FR6L6XAP.js} +1 -1
- package/browser/{chunk-JL56QKED.js → chunk-FSGCO2Z5.js} +1 -1
- package/browser/{chunk-Y5GN5XOG.js → chunk-FV3VHB7N.js} +1 -1
- package/browser/chunk-G4XFK7EF.js +1 -0
- package/browser/{chunk-WVCZAPRZ.js → chunk-G7HGWSUU.js} +1 -1
- package/browser/{chunk-MLFDP74G.js → chunk-GDPQI6PI.js} +1 -1
- package/browser/{chunk-LBWSX76J.js → chunk-GINPKODK.js} +1 -1
- package/browser/{chunk-HNU2JIBP.js → chunk-GJIFUWGQ.js} +1 -1
- package/browser/{chunk-OYNVXKZ3.js → chunk-GUF6JXSS.js} +1 -1
- package/browser/{chunk-DDM5K7MP.js → chunk-GWL7ZN37.js} +1 -1
- package/browser/{chunk-L6YGMZJK.js → chunk-HBH23XBO.js} +1 -1
- package/browser/{chunk-E5HC3WFJ.js → chunk-HC2YTBED.js} +1 -1
- package/browser/{chunk-LC5JP6E6.js → chunk-HDJJJAZJ.js} +1 -1
- package/browser/{chunk-SWQE65GY.js → chunk-HHSXXJFJ.js} +1 -1
- package/browser/{chunk-SZDTKNUH.js → chunk-HK2NKWCI.js} +1 -1
- package/browser/{chunk-4MFA5Y4Y.js → chunk-HMKM466S.js} +1 -1
- package/browser/{chunk-63WMMXIG.js → chunk-HPPKFGND.js} +1 -1
- package/browser/{chunk-IZK2IN4R.js → chunk-HVRLWPZX.js} +1 -1
- package/browser/{chunk-2525CDKJ.js → chunk-HYXSN2J6.js} +1 -1
- package/browser/{chunk-X34LKMFX.js → chunk-I24HJLN4.js} +1 -1
- package/browser/{chunk-MCPXNQRW.js → chunk-I4WJ5CEN.js} +1 -1
- package/browser/{chunk-J4J3XVRF.js → chunk-IAFZ6YAO.js} +1 -1
- package/browser/{chunk-2MGVRRAP.js → chunk-IAFZ75L3.js} +13 -13
- package/browser/chunk-IBZF5QXJ.js +1 -0
- package/browser/{chunk-OVSWMLB3.js → chunk-IE2H4VRD.js} +1 -1
- package/browser/{chunk-NCXT27M5.js → chunk-IJXCL7KL.js} +1 -1
- package/browser/{chunk-KJROORJO.js → chunk-IPJU7D3K.js} +1 -1
- package/browser/chunk-IQ7VK4UE.js +5 -0
- package/browser/{chunk-J55W7XV7.js → chunk-IR75FMI5.js} +1 -1
- package/browser/{chunk-PY3PDRRW.js → chunk-ISY4SDFY.js} +1 -1
- package/browser/{chunk-KLKZQABE.js → chunk-IT7I47UZ.js} +1 -1
- package/browser/{chunk-3XRT75ZN.js → chunk-IUE6IUOH.js} +1 -1
- package/browser/{chunk-YBLSVIMZ.js → chunk-IZQ5FNXP.js} +1 -1
- package/browser/{chunk-44LXIDEF.js → chunk-J3OQGBIN.js} +1 -1
- package/browser/{chunk-QBNQANTG.js → chunk-JGWQC4DI.js} +1 -1
- package/browser/{chunk-RINV4BX7.js → chunk-JGYO4OTZ.js} +1 -1
- package/browser/{chunk-IH5OCDKI.js → chunk-JRM47ALM.js} +1 -1
- package/browser/{chunk-24A2APSJ.js → chunk-JXHHT6R2.js} +1 -1
- package/browser/{chunk-LIH722A3.js → chunk-JXXEYFN7.js} +1 -1
- package/browser/{chunk-MJV24UTS.js → chunk-KB64CIW5.js} +2 -2
- package/browser/{chunk-6IVR565J.js → chunk-KDOS4X4T.js} +1 -1
- package/browser/{chunk-3XJHHRJT.js → chunk-KFUPP33B.js} +1 -1
- package/browser/{chunk-6M6QFFLT.js → chunk-KL5VH4OU.js} +1 -1
- package/browser/{chunk-XOOFBNDP.js → chunk-KLZBTT2P.js} +1 -1
- package/browser/{chunk-WPTBNQ2V.js → chunk-KMYTSO3Q.js} +1 -1
- package/browser/{chunk-PF3TLOCL.js → chunk-KNQEOPID.js} +1 -1
- package/browser/{chunk-K6YQ5CRH.js → chunk-KPZU3ZPZ.js} +1 -1
- package/browser/{chunk-YX5ADQPF.js → chunk-KTV4REGV.js} +1 -1
- package/browser/{chunk-4ZMJFXGW.js → chunk-KWDQGODG.js} +1 -1
- package/browser/{chunk-5XDBC6O7.js → chunk-L3JI6OZ3.js} +1 -1
- package/browser/{chunk-AOQIZ6M2.js → chunk-L453AX2W.js} +1 -1
- package/browser/{chunk-TW3MVM2R.js → chunk-L5HF7UAT.js} +1 -1
- package/browser/{chunk-PO2OKV6Q.js → chunk-LAQMHKSP.js} +1 -1
- package/browser/{chunk-M5IOFMBZ.js → chunk-LDDG4GE7.js} +1 -1
- package/browser/{chunk-XLE4M4WS.js → chunk-LFHXGZHT.js} +1 -1
- package/browser/{chunk-CNCKIVTQ.js → chunk-LJMHI6I5.js} +1 -1
- package/browser/{chunk-XYHPCRIZ.js → chunk-LODGW3WU.js} +1 -1
- package/browser/{chunk-2CWEU47S.js → chunk-M4BTEXS6.js} +1 -1
- package/browser/{chunk-ORP2SVPR.js → chunk-M76YU6SQ.js} +1 -1
- package/browser/{chunk-CRU6KO53.js → chunk-MFDMUMA4.js} +1 -1
- package/browser/{chunk-TKJUJYEI.js → chunk-MHZV4BL7.js} +1 -1
- package/browser/{chunk-CUY227OT.js → chunk-MNZLKEWQ.js} +1 -1
- package/browser/{chunk-7H3GMZJN.js → chunk-MREFZR3I.js} +1 -1
- package/browser/{chunk-T4MVTLYE.js → chunk-MTU6753J.js} +1 -1
- package/browser/{chunk-IEYBKFX7.js → chunk-MXGNASOC.js} +1 -1
- package/browser/{chunk-PZVPROT6.js → chunk-N43HXORE.js} +1 -1
- package/browser/{chunk-S6FVFOZM.js → chunk-N7C7P5QN.js} +1 -1
- package/browser/{chunk-EE3OKRUQ.js → chunk-NCT5IK4R.js} +1 -1
- package/browser/{chunk-EIBM6U5N.js → chunk-NERV3W42.js} +1 -1
- package/browser/{chunk-RCMYO542.js → chunk-NJB3X4XL.js} +1 -1
- package/browser/{chunk-JQOVAMQC.js → chunk-NM3RF6OH.js} +1 -1
- package/browser/{chunk-2SFQGHFV.js → chunk-O4IQZBVW.js} +1 -1
- package/browser/{chunk-WGBW2YLG.js → chunk-O4SFEWMN.js} +1 -1
- package/browser/{chunk-2EEKMQEX.js → chunk-OGN6JWED.js} +1 -1
- package/browser/{chunk-PRROMENK.js → chunk-OJ5SEYSF.js} +1 -1
- package/browser/{chunk-XF27FA5V.js → chunk-OKEI5RKW.js} +1 -1
- package/browser/{chunk-5VGCSK5N.js → chunk-OKVQYK4Y.js} +1 -1
- package/browser/{chunk-M6UB4WVK.js → chunk-OLT6DXR7.js} +1 -1
- package/browser/{chunk-TQZVYC7J.js → chunk-OMKIT3Z4.js} +1 -1
- package/browser/{chunk-WIYO452T.js → chunk-OTT6RJHI.js} +1 -1
- package/browser/{chunk-FPGIRAZZ.js → chunk-OYO4SRAO.js} +1 -1
- package/browser/{chunk-CF4MHWEX.js → chunk-P2FSLJ4X.js} +1 -1
- package/browser/{chunk-NJOOFJNE.js → chunk-PCAFUCUK.js} +1 -1
- package/browser/chunk-PCFR4J66.js +131 -0
- package/browser/{chunk-CRMTCX6F.js → chunk-PIW2M2DH.js} +2 -2
- package/browser/{chunk-M6PA26FM.js → chunk-PIYVELLT.js} +1 -1
- package/browser/{chunk-WT6PMWGG.js → chunk-PLVOH67J.js} +1 -1
- package/browser/{chunk-CFSYN7MV.js → chunk-PNN75KZR.js} +1 -1
- package/browser/{chunk-JJ55MEGU.js → chunk-PQ65IMRY.js} +1 -1
- package/browser/{chunk-SLDIBIUY.js → chunk-PQFMYP23.js} +1 -1
- package/browser/{chunk-LLXEUJDC.js → chunk-PQS3RLPI.js} +1 -1
- package/browser/{chunk-WPKJOXVT.js → chunk-PROSYUA2.js} +1 -1
- package/browser/{chunk-27KLJCCF.js → chunk-PTQCXOVM.js} +1 -1
- package/browser/chunk-PUFGTKWO.js +1 -0
- package/browser/{chunk-K2U4QSXW.js → chunk-PUXE7FLT.js} +1 -1
- package/browser/{chunk-7YKHGYIG.js → chunk-PXKNGMLL.js} +1 -1
- package/browser/{chunk-MSSTCYNC.js → chunk-QCCKEP2R.js} +1 -1
- package/browser/{chunk-TY7JJASH.js → chunk-QGYIPOLS.js} +1 -1
- package/browser/{chunk-SZ24MNHM.js → chunk-QHWRBSOD.js} +1 -1
- package/browser/chunk-QMFA3PF5.js +1 -0
- package/browser/{chunk-A3FTQA6E.js → chunk-RCC5SUNH.js} +1 -1
- package/browser/{chunk-Q2GPSDAM.js → chunk-RFVQHGYD.js} +1 -1
- package/browser/{chunk-IMO77OHS.js → chunk-RKCNENWQ.js} +1 -1
- package/browser/{chunk-HPWVZRZF.js → chunk-RMIJZMA5.js} +1 -1
- package/browser/{chunk-NEJRKLYO.js → chunk-RNEU5YBN.js} +1 -1
- package/browser/{chunk-K5ERLQ63.js → chunk-RO5PWDCR.js} +1 -1
- package/browser/{chunk-JR6SBNDP.js → chunk-RPJIPLQS.js} +1 -1
- package/browser/{chunk-6B56KYAF.js → chunk-RRYYS272.js} +1 -1
- package/browser/{chunk-NUVM5VMH.js → chunk-S4ZRXSPZ.js} +1 -1
- package/browser/{chunk-6BWXSO4B.js → chunk-SA67OWFV.js} +1 -1
- package/browser/{chunk-HEGIEXS3.js → chunk-SGSOCLV7.js} +1 -1
- package/browser/{chunk-ZHTSXEVO.js → chunk-SICZ4VWZ.js} +1 -1
- package/browser/{chunk-PT3R3NCF.js → chunk-SYMXIBEB.js} +1 -1
- package/browser/{chunk-FW2LVBF2.js → chunk-T3HVVJIV.js} +1 -1
- package/browser/{chunk-RUE7RBU6.js → chunk-TCR2YYM5.js} +1 -1
- package/browser/{chunk-IWPVMLPY.js → chunk-TMQ7NWGZ.js} +1 -1
- package/browser/{chunk-MVCDG4KS.js → chunk-TPHEWWHE.js} +5 -5
- package/browser/{chunk-3JW3NITX.js → chunk-TPKU52VV.js} +1 -1
- package/browser/chunk-TR5NO2CB.js +1 -0
- package/browser/{chunk-ODGFQ7QJ.js → chunk-TS6CZC3J.js} +1 -1
- package/browser/{chunk-SUP23S2E.js → chunk-TWVDGGTY.js} +1 -1
- package/browser/{chunk-ZOPOSPVC.js → chunk-TX6ZFPHY.js} +1 -1
- package/browser/{chunk-Y3BA3YGC.js → chunk-U3EOEZ3B.js} +1 -1
- package/browser/{chunk-GHGFRLKE.js → chunk-U3WVC6SN.js} +1 -1
- package/browser/{chunk-DMZ5HEOT.js → chunk-U5HTULBC.js} +1 -1
- package/browser/{chunk-ZRNGBR7A.js → chunk-UEMKVZMR.js} +1 -1
- package/browser/{chunk-MIW5EYCH.js → chunk-USEPOJ5L.js} +1 -1
- package/browser/{chunk-ZWPJWDYN.js → chunk-UYXD7WPN.js} +1 -1
- package/browser/{chunk-HNLSUZUH.js → chunk-V6MKE6LP.js} +1 -1
- package/browser/{chunk-CJFDTLOQ.js → chunk-V7HBROQ5.js} +1 -1
- package/browser/{chunk-UZMFXHQD.js → chunk-VBX5VOJG.js} +1 -1
- package/browser/{chunk-HG6BRXAC.js → chunk-VCQBS5CA.js} +1 -1
- package/browser/{chunk-74B5JZ5G.js → chunk-VO3NT5EH.js} +1 -1
- package/browser/{chunk-HD6ETXDZ.js → chunk-VQBUIUJC.js} +1 -1
- package/browser/chunk-VS3RTXZC.js +5 -0
- package/browser/{chunk-2SJZWKFD.js → chunk-W34NDG3T.js} +1 -1
- package/browser/{chunk-Q5FKQWU2.js → chunk-W5N6DMDQ.js} +1 -1
- package/browser/{chunk-ZKQFRAZ2.js → chunk-WAAJYULE.js} +1 -1
- package/browser/{chunk-K2M625FR.js → chunk-WACBOZDR.js} +1 -1
- package/browser/{chunk-4DH3BDE3.js → chunk-WAXYETAG.js} +1 -1
- package/browser/{chunk-NWBLFLVC.js → chunk-WKB7BKHN.js} +1 -1
- package/browser/chunk-WRZUQ2QI.js +1 -0
- package/browser/{chunk-BFHHIWRM.js → chunk-WXJTNRD3.js} +1 -1
- package/browser/{chunk-4KOOWCML.js → chunk-X6XUOWVT.js} +2 -2
- package/browser/{chunk-GIW2PDIG.js → chunk-XF5XKXE6.js} +1 -1
- package/browser/{chunk-R4K5X4RE.js → chunk-XHA6WGTO.js} +1 -1
- package/browser/{chunk-2ILW7WWJ.js → chunk-XIXREDEB.js} +1 -1
- package/browser/{chunk-2557JAG4.js → chunk-XKAKP3E6.js} +1 -1
- package/browser/{chunk-5RLB3NV4.js → chunk-XRLRUCRR.js} +1 -1
- package/browser/{chunk-CABP6X3M.js → chunk-XTMUP2BA.js} +1 -1
- package/browser/{chunk-EUQGYTUL.js → chunk-XWWKCPZS.js} +1 -1
- package/browser/{chunk-JTLGGNCW.js → chunk-XXNLATCJ.js} +1 -1
- package/browser/{chunk-2IE6U5ND.js → chunk-XZFHDKIK.js} +1 -1
- package/browser/{chunk-7WXTIXID.js → chunk-XZXNHGZ2.js} +1 -1
- package/browser/{chunk-RHVNZ2DF.js → chunk-YL6HCV6T.js} +1 -1
- package/browser/{chunk-5574BNHI.js → chunk-YM2ZQTDF.js} +1 -1
- package/browser/{chunk-LPD3H6QQ.js → chunk-YMVBGQ2W.js} +1 -1
- package/browser/{chunk-ZJ4AGOKX.js → chunk-YQ5GJPDB.js} +1 -1
- package/browser/chunk-YQE3PJGM.js +18 -0
- package/browser/{chunk-SII6VICE.js → chunk-YXNBLVK4.js} +1 -1
- package/browser/{chunk-EXIKKRCD.js → chunk-YZP4FX7D.js} +1 -1
- package/browser/{chunk-WGWBCLKM.js → chunk-ZEXXJZ7U.js} +1 -1
- package/browser/chunk-ZRHYTE5S.js +1 -0
- package/browser/index.html +2 -2
- package/browser/{main-H2XKB5YR.js → main-7FKCOQYA.js} +2 -2
- package/browser/{styles-CA5KWC36.css → styles-J6LGFNKV.css} +1 -1
- package/package.json +1 -1
- package/browser/chunk-2IOQJSBS.js +0 -1
- package/browser/chunk-3UKPPC6K.js +0 -131
- package/browser/chunk-4XD6LZU6.js +0 -1
- package/browser/chunk-5J2SNOT2.js +0 -1
- package/browser/chunk-5YCIPH6P.js +0 -1
- package/browser/chunk-AXUFQOIY.js +0 -1
- package/browser/chunk-D75PDB6P.js +0 -1
- package/browser/chunk-ERFYUZ7W.js +0 -1
- package/browser/chunk-GERGGB25.js +0 -1
- package/browser/chunk-GZXTL4RE.js +0 -1
- package/browser/chunk-IRPQWJZH.js +0 -5
- package/browser/chunk-LBIXL2NM.js +0 -5
- package/browser/chunk-SQVN35HO.js +0 -1
- package/browser/chunk-UAVXXCN2.js +0 -1
- package/browser/chunk-WR3A6SD3.js +0 -18
- package/browser/chunk-XDJAJP7W.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R,b as j}from"./chunk-
|
|
1
|
+
import{a as R,b as j}from"./chunk-XIXREDEB.js";import{u as N,v as U,w as $}from"./chunk-EGUIWOC3.js";import{e as E,f as I}from"./chunk-QGYIPOLS.js";import{F as D,h as P,o as V}from"./chunk-OJ5SEYSF.js";import{Ab as y,Bb as g,Ca as _,Cb as c,Db as a,Kc as S,Lb as h,Nb as b,Pb as p,Wa as d,cc as l,cd as T,dc as f,ec as L,gb as C,pa as x,rd as A,ta as m,tc as O,ua as s,ub as M,wb as w,xb as v,zb as F}from"./chunk-VS3RTXZC.js";import{a as u,b as k}from"./chunk-SNAKHGZS.js";var z=r=>({"bg-gradient-warning":r});function B(r,n){if(r&1){let e=h();c(0,"div",7)(1,"label",10)(2,"mat-checkbox",11),b("change",function(t){m(e);let i=p();return s(i.selectAll(t))}),c(3,"span",12),l(4,"Select All Users"),a(),c(5,"span",13),l(6),a()()()()}if(r&2){let e=p();d(6),L("",e.selectedUsers().length," selected")}}function G(r,n){if(r&1){let e=h();c(0,"div",14),b("click",function(){let t=m(e).$implicit,i=p();return s(i.onSelect(t))})("keydown.enter",function(){let t=m(e).$implicit,i=p();return s(i.onSelect(t))})("keydown.space",function(t){let i=m(e).$implicit;return p().onSelect(i),s(t.preventDefault())}),c(1,"mat-checkbox",15),b("change",function(){let t=m(e).$implicit,i=p();return s(i.onSelect(t))})("click",function(t){return m(e),s(t.stopPropagation())}),c(2,"span",16),l(3),a(),c(4,"span",17),l(5),a()()()}if(r&2){let e=n.$implicit;g("ngClass",O(4,z,e.Type===2)),d(),g("ngModel",e.check),d(2),f(e.LoginID),d(2),f(e.Email)}}var W=class r{data=x(I);dialogRef=x(E);modalConfig=new N;userAccess=_(this.data);selectedUsers=S(()=>this.userAccess().filter(n=>n.check));constructor(){this.modalConfig.title="Logout these Users",this.modalConfig.customWidth="400px",this.modalConfig.okText="Force Logout"}selectAll(n){let e=n.checked;this.userAccess.update(o=>o.map(t=>k(u({},t),{check:e})))}onSelect(n){this.userAccess.update(e=>e.map(o=>o===n?k(u({},o),{check:!o.check}):o))}onClose(){this.dialogRef.close()}onOk(){let n=this.userAccess().filter(e=>e.check);this.dialogRef.close(n)}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=C({type:r,selectors:[["app-modal-confirm-force-logout"]],decls:17,vars:2,consts:[[3,"onCancel","onClose","onOk","config"],[1,"card","warning-banner","mb-0","p-0"],[1,"card-body","d-flex","justify-content-start","align-items-center","gap-4","p-6"],[1,"fs-2"],[1,"text-white"],[1,"warning-msg","mb-0","text-white","lh-sm","mt-2"],[1,"mt-8"],[1,"select-all-container"],["id","userList",1,"user-list","custom-scroll"],["role","button","tabindex","0",1,"user-item","pos-checkbox-green",3,"ngClass"],[1,"checkbox-container","pos-checkbox-green"],[3,"change"],[1,"select-all-label","fw-bold"],["id","selectedCount",1,"selected-count","ms-4"],["role","button","tabindex","0",1,"user-item","pos-checkbox-green",3,"click","keydown.enter","keydown.space","ngClass"],[1,"pos-checkbox-green",3,"change","click","ngModel"],[1,"fw-bold","d-block"],[1,"fw-normal","text-muted","small","d-block","mt-3"]],template:function(e,o){e&1&&(c(0,"modal-material",0),b("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()})("onOk",function(){return o.onOk()}),c(1,"content")(2,"div",1)(3,"div",2)(4,"div")(5,"span",3),l(6," \u26A0\uFE0F "),a()(),c(7,"div")(8,"h5",4),l(9,"Warning: Forced Logout"),a(),c(10,"p",5),l(11," Selected users will be immediately logged out and their sessions terminated. "),a()()()(),c(12,"div",6),M(13,B,7,1,"div",7),c(14,"div",8),F(15,G,6,6,"div",9,v),a()()()()),e&2&&(g("config",o.modalConfig),d(13),w(o.userAccess().length>1?13:-1),d(2),y(o.userAccess()))},dependencies:[A,T,$,U,j,R,D,P,V],styles:[".custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#89b03e;border-radius:3px}.custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#7a9e37}ul[_ngcontent-%COMP%]{list-style-type:none}.warning-banner[_ngcontent-%COMP%]{background:linear-gradient(135deg,#ff6b6b,#ee5a52);color:#fff;padding:16px;box-shadow:0 4px 15px #ff6b6b4d}.select-all-container[_ngcontent-%COMP%]{background:#f8f9fa;padding:6px;border-radius:12px;margin-bottom:16px;border:2px solid #e9ecef;transition:all .3s ease}.select-all-container[_ngcontent-%COMP%]:hover{border-color:#89b03e;background:#f0f7e8}.selected-count[_ngcontent-%COMP%]{background:#89b03e;color:#fff;padding:4px 8px;border-radius:12px;font-size:12px;font-weight:600}.user-list[_ngcontent-%COMP%]{max-height:159px;overflow-y:auto;border:1px solid #e9ecef;border-radius:12px;background:#fff}.user-item[_ngcontent-%COMP%]{padding:6px;border-bottom:1px solid #f1f3f4;display:flex;align-items:center;gap:12px;transition:all .3s ease;cursor:pointer;min-height:52px}.user-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.user-item[_ngcontent-%COMP%]:hover{background:#f8f9fa}.user-item.selected[_ngcontent-%COMP%]{background:#e8f5e8} .pos-checkbox-green .mat-checkbox.mat-accent .mat-checkbox-frame{border-color:#89b03e!important} .pos-checkbox-green .mat-checkbox-checked.mat-accent .mat-checkbox-frame{border-color:#89b03e!important} .pos-checkbox-green .mat-checkbox-checked.mat-accent .mat-checkbox-background{border-color:#89b03e!important;background-color:#89b03e!important} .pos-checkbox-green .mat-checkbox-ripple .mat-ripple-element{background-color:#89b03e!important} .pos-checkbox-green .mat-checkbox-frame, .pos-checkbox-green .mat-checkbox .mat-checkbox-frame{border-color:#89b03e!important} .pos-checkbox-green .mat-checkbox.mat-primary .mat-checkbox-frame{border-color:#89b03e!important} .pos-checkbox-green .mat-checkbox.mat-primary .mat-checkbox-background{background-color:#89b03e!important;border-color:#89b03e!important} .pos-checkbox-green .mat-ripple-element, .pos-checkbox-green .mat-checkbox .mat-ripple-element{background-color:#89b03e!important} .pos-checkbox-green .mat-mdc-checkbox .mdc-checkbox__background{background-color:transparent} .pos-checkbox-green .mat-mdc-checkbox.mat-mdc-checkbox-checked .mdc-checkbox__background, .pos-checkbox-green .mat-mdc-checkbox.mat-mdc-checkbox-checked .mdc-checkbox__mixedmark{background-color:#89b03e!important;color:#fff!important;border-color:#89b03e!important} .pos-checkbox-green .mat-mdc-checkbox.mat-mdc-checkbox-checked .mdc-checkbox__checkmark-path{stroke:#fff!important} .pos-checkbox-green .mat-mdc-checkbox .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:#89b03e!important} .pos-checkbox-green .mat-mdc-checkbox.mat-primary .mdc-checkbox__background, .pos-checkbox-green .mat-primary .mdc-checkbox__background{border-color:#89b03e!important;background-color:#89b03e!important} .pos-checkbox-green .mat-mdc-checkbox .mdc-checkbox__native-control:checked~.mdc-checkbox__background{border-color:#89b03e!important;background-color:#89b03e!important} .pos-checkbox-green .mat-mdc-checkbox.mat-primary.mat-mdc-checkbox-checked .mdc-checkbox__checkmark-path{stroke:#fff!important}"]})};export{W as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as le}from"./chunk-FAGD2TBB.js";import{a as oe,b as ae,c as re}from"./chunk-L5HF7UAT.js";import{a as xe,b as fe}from"./chunk-IZQ5FNXP.js";import{f as ye}from"./chunk-L453AX2W.js";import{c as ve}from"./chunk-GUF6JXSS.js";import{b as se}from"./chunk-HVRLWPZX.js";import{a as _e}from"./chunk-WKB7BKHN.js";import{e as ue,f as ge}from"./chunk-KDOS4X4T.js";import{b as Ce}from"./chunk-EGADVOKH.js";import{b as ne,c as ie}from"./chunk-VQBUIUJC.js";import{a as me,d as pe,e as de}from"./chunk-2JU7KFOZ.js";import{g as ce}from"./chunk-QGYIPOLS.js";import{F as $,c as U,h as X,o as Y,q as Z}from"./chunk-OJ5SEYSF.js";import{d as te}from"./chunk-TS6CZC3J.js";import{Ab as H,Bb as g,Bc as S,Ca as O,Cb as o,Cc as w,Db as a,Eb as j,Hc as G,Ib as F,Jb as M,Lb as T,Lc as R,Nb as V,Pb as r,Wa as i,Zd as K,be as J,cb as h,cc as m,dc as D,ec as y,ee,gb as L,hc as v,ic as x,jc as f,kb as W,mb as A,nc as k,od as q,pa as E,rd as z,ta as C,tc as Q,ua as _,ub as d,wb as s,yb as B,zb as N}from"./chunk-VS3RTXZC.js";import{a as b,b as P}from"./chunk-SNAKHGZS.js";var he=n=>({ID:n});function De(n,p){if(n&1){let e=T();o(0,"button",16),V("click",function(){C(e);let t=r();return _(t.openExportModal())}),j(1,"i",17),m(2," Export "),a()}}function Se(n,p){if(n&1&&(o(0,"span",27),m(1),a()),n&2){let e=p.item;g("matTooltip",k(e.Value)),i(),D(e.Value)}}function we(n,p){if(n&1){let e=T();o(0,"div",18)(1,"div")(2,"h6"),m(3,"Outlet"),a(),o(4,"outlet-selector",19),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),m(7,"Category"),a(),o(8,"POS-product-category-select",20),f("selectedCategoryIDChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),m(11,"Brand"),a(),o(12,"ng-select",21),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),A(13,Se,2,3,"ng-template",22),a()(),o(14,"div")(15,"h6"),m(16,"Product Tags"),a(),o(17,"ng-select",23),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),m(20,"Quantity From - To"),a(),o(21,"div",24)(22,"input",25),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),m(23," - "),o(24,"input",26),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),g("accessType",2),v("ngModel",e.pageData.Filter.OutletID),i(4),v("selectedCategoryID",e.pageData.Filter.ProductCategoryID),g("showClear",!0),i(4),g("items",e.pageData.Options==null?null:e.pageData.Options.Brands),v("ngModel",e.pageData.Filter.ProductBrandID),i(5),g("items",e.pageData.Options==null?null:e.pageData.Options.Tags),v("ngModel",e.pageData.Filter.ProductTagID),i(5),v("ngModel",e.pageData.Filter.QtyFrom),i(2),v("ngModel",e.pageData.Filter.QtyTo)}}function Te(n,p){if(n&1&&(o(0,"th",10),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantName.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",11),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantCode.name," ")}}function be(n,p){if(n&1&&(o(0,"th",12),m(1),a()),n&2){let e=r();i(),y(" ",e.column.OnHand.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",13),m(1),a()),n&2){let e=r();i(),y(" ",e.column.DirectAllocated.name," ")}}function Fe(n,p){if(n&1&&(o(0,"th",14),m(1),a()),n&2){let e=r();i(),y(" ",e.column.IndirectAllocated.name," ")}}function Me(n,p){if(n&1&&(o(0,"th",15),m(1),a()),n&2){let e=r();i(),y(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",28),m(2),a()()),n&2){let e=r().$implicit;i(),g("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",Q(3,he,e.VariantID)),i(),y(" ",e.VariantName," ")}}function Ee(n,p){if(n&1&&(o(0,"td"),m(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Oe(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Le(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&d(0,Le,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function Be(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function Ne(n,p){if(n&1&&d(0,Be,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function He(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function je(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function ke(n,p){if(n&1&&(o(0,"tr"),d(1,Ae,3,5,"td"),d(2,Ee,2,1,"td"),d(3,Oe,3,3,"td"),d(4,We,1,1)(5,Ne,1,1),d(6,He,3,3,"td"),d(7,je,3,3,"td"),a()),n&2){let e=r();i(),s(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),s(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),s(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),s(e.totalIndirect()>0?4:5),i(2),s(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),s(e.column.Available&&e.column.Available.selected?7:-1)}}function Qe(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",29),V("jumpToPage",function(){C(e);let t=r();return _(t.getListData())})("previousPage",function(){C(e);let t=r();return _(t.getListData())})("nextPage",function(){C(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),g("total",e.data.Data.length)("pageData",e.pageData)}}var Ie=class n extends le{constructor(e,c,t,l,I){super(e,c,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=c;this.csvConverter=l;this.roleService=I;R(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);dialog=E(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let c=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",c),this.totalIndirect.set(c)}sortData(e){let c=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=c;return}this.infiniteList=c.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(se,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(c){return new(c||n)(h(Ce),h(ee),h(J),h(_e),h(te))};static \u0275cmp=L({type:n,selectors:[["pos-composite-inventory"]],features:[W],decls:22,vars:13,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["mat-sort-header","DirectAllocated",2,"width","10%"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(c,t){if(c&1){let l=T();o(0,"mainpanel-cmp",1),f("textChange",function(u){return C(l),x(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return C(l),_(t.searchFromPageOne())}),f("filterChange",function(u){return C(l),x(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),F(1,2),d(2,De,3,0,"button",3),M(),F(3,4),A(4,we,25,10,"ng-template",null,0,G),M(),F(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return C(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),d(12,Te,2,1,"th",10),d(13,Ve,2,1,"th",11),d(14,be,2,1,"th",12),d(15,Pe,2,1,"th",13),d(16,Fe,2,1,"th",14),d(17,Me,2,1,"th",15),a()(),o(18,"tbody"),N(19,ke,8,6,"tr",null,B),a()()(),d(21,Qe,2,2,"div"),a(),M(),a()}c&2&&(g("pageData",t.menuData),v("text",t.pageData.Filter.SearchText),g("isFilterOnDropdown",!1),v("filter",t.pageData.Filter),g("column",t.column),i(2),s(t.roleService.global.Export?2:-1),i(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),s(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),s(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?15:-1),i(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),s(t.column.Available&&t.column.Available.selected?17:-1),i(2),H(t.infiniteList),i(2),s(t.data?21:-1))},dependencies:[ge,ue,ve,ye,$,U,Z,X,Y,de,pe,me,ie,ne,fe,xe,z,K,re,oe,ae,q],styles:["[_nghost-%COMP%]{display:block}"]})};export{Ie as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-3LPZYQS6.js";import{Hb as s,Ia as i,gb as c,kb as a,va as r}from"./chunk-VS3RTXZC.js";var p=["data-p-icon","chevron-right"],f=(()=>{class e extends C{static \u0275fac=(()=>{let t;return function(o){return(t||(t=i(e)))(o||e)}})();static \u0275cmp=c({type:e,selectors:[["","data-p-icon","chevron-right"]],features:[a],attrs:p,decls:1,vars:0,consts:[["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(n,o){n&1&&(r(),s(0,"path",0))},encapsulation:2})}return e})();export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as b}from"./chunk-
|
|
1
|
+
import{D as b}from"./chunk-EGUIWOC3.js";import{O as s}from"./chunk-HYXSN2J6.js";import{ee as D,la as y,oa as c,t as l}from"./chunk-VS3RTXZC.js";var p=class{_EntityID;_ID;_Note;_Number;_VariantID;_Quantity;_ExpiryDate;constructor(t){t&&(this.EntityID=t.EntityID,this.ID=t.ID,this.Note=t.Note,this.Number=t.Number,this.VariantID=t.VariantID,this.Quantity=t.Quantity,this.ExpiryDate=t.ExpiryDate)}get Quantity(){return this._Quantity}set Quantity(t){this._Quantity=t}get EntityID(){return this._EntityID}get ID(){return this._ID}get Note(){return this._Note}get Number(){return this._Number}get VariantID(){return this._VariantID}set EntityID(t){this._EntityID=t}set ID(t){this._ID=t}set Note(t){this._Note=t}set Number(t){this._Number=t}set VariantID(t){this._VariantID=t}get ExpiryDate(){return this._ExpiryDate}set ExpiryDate(t){this._ExpiryDate=t}};var g=class o{constructor(t,i){this.httpService=t;this.localData=i}findVariantByID(t,i,n=!0){return new Promise((a,e)=>{this.localData.isConfigFromServer().subscribe(u=>{u?this.httpService.get(s.GetVariantByID,[{key:"ID",value:t},{key:"EntityID",value:i},{key:"Promotion",value:n}]).subscribe({next:r=>{a(r)},error:r=>{e(r)}}):this.localData.findVariantById(t,i).subscribe({next:r=>{a(r)},error:r=>{e(r)}})})})}findVariantByCode(t,i,n=!1){return new Promise((a,e)=>{this.localData.isProductFromServer().subscribe(u=>{u?this.httpService.get(s.GetVariantByCode,[{key:"Code",value:t},{key:"EntityID",value:i},{key:"BarcodeSerial",value:n},{key:"Promotion",value:!0}]).subscribe({next:r=>{a(r)},error:r=>{e(r)}}):this.localData.findVariantByCode(t,i).subscribe({next:r=>{a(r)},error:r=>{e(r)}})})})}getVariantSerial(t,i){return this.httpService.post(s.GetVariantSerial,{entityID:t,variantID:i}).pipe(l(n=>n.map(e=>new p(e))))}getSerialByVarianIds(t,i){return this.httpService.post(s.GetVariantSerialByListVariantID,{EntityID:t,ListVariantID:i})}findVariantBySerial(t,i){return this.httpService.get(s.GetVariantBySerial,[{key:"Serial",value:t},{key:"EntityID",value:i}])}getStockByID(t,i){return new Promise((n,a)=>{this.httpService.get(s.GetVariantStockByID,[{key:"ID",value:t},{key:"EntityID",value:i}]).subscribe({next:e=>n(e),error:e=>a(e)})})}static \u0275fac=function(i){return new(i||o)(c(D),c(b))};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,d as X}from"./chunk-
|
|
1
|
+
import{c as W,d as X}from"./chunk-L453AX2W.js";import{a as Y,b as Z}from"./chunk-RFVQHGYD.js";import{b as Q,c as U}from"./chunk-VQBUIUJC.js";import{a as B}from"./chunk-DB3W42KN.js";import{la as K}from"./chunk-WAXYETAG.js";import{F as J,h as q,o as G}from"./chunk-OJ5SEYSF.js";import{a as d}from"./chunk-TS6CZC3J.js";import{Bb as l,Bc as k,Cb as c,Cc as F,Db as m,Hc as N,Kb as L,Lb as j,Nb as E,Pb as n,Wa as _,Xa as M,Y as f,Zb as I,ca as S,cb as b,cc as v,d as x,ec as R,ee as C,fa as T,ga as u,gb as $,jd as P,kd as z,la as w,mb as a,o as h,oa as O,pa as D,rd as A,ta as p,ua as g,ub as H,wb as V}from"./chunk-VS3RTXZC.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(d.IsEmpty(this.selectedCategoryID)&&d.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel=this.placeholder}findSelectedCategory(t,e){if(d.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{ee as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{la as r}from"./chunk-
|
|
1
|
+
import{la as r}from"./chunk-VS3RTXZC.js";var o=class t{searchFilterNativeEl;constructor(){}static \u0275fac=function(e){return new(e||t)};static \u0275prov=r({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ft}from"./chunk-
|
|
1
|
+
import{a as Ft}from"./chunk-RFVQHGYD.js";import{b as It}from"./chunk-V7HBROQ5.js";import{b as Et,d as Lt,e as Dt}from"./chunk-XF5XKXE6.js";import{a as Ct,b as Tt,c as wt,d as Vt,e as kt}from"./chunk-2QD46TNT.js";import{a as St}from"./chunk-YQ5GJPDB.js";import{a as Ot}from"./chunk-KMYTSO3Q.js";import{a as Mt}from"./chunk-BRHHRJLT.js";import{b as vt,c as Fe}from"./chunk-KTV4REGV.js";import{b as xt}from"./chunk-3LPZYQS6.js";import{a as Je}from"./chunk-DB3W42KN.js";import{a as ft,c as bt,d as yt}from"./chunk-TX6ZFPHY.js";import{b as at,c as mt,d as _t,f as ht,i as gt}from"./chunk-YZP4FX7D.js";import{E as it,S as nt,U as Q,V as K,W as le,Z as oe,aa as lt,ca as ot,ha as st,ia as rt,ja as ct,ka as pt,la as dt,ma as ae,na as se,ua as ut,v as ve,w as H,y as et,z as tt}from"./chunk-WAXYETAG.js";import{F as ne,a as ye,h as te,o as ie}from"./chunk-OJ5SEYSF.js";import{$ as Pe,Bb as r,Bc as ge,Ca as D,Cb as u,Cc as be,Db as h,Eb as z,Hc as L,Ia as Oe,Ib as O,Jb as I,Kb as V,Kc as G,Lb as T,Lc as je,Nb as x,Oc as We,Pb as s,Pc as M,Qb as qe,Rb as Te,Sb as S,Tb as k,Ub as f,Vb as g,Wa as c,Xa as w,Xc as v,Y as Ae,Ya as Ke,Yc as X,Zb as Y,_b as Be,aa as Re,ac as he,bc as y,ca as Ne,cb as _e,cc as F,cd as Ue,d as Ce,dc as P,ec as fe,ed as Ye,ee as Xe,fa as de,fd as Ve,ga as ze,gb as U,hb as $e,hc as $,ic as q,id as Me,jc as B,jd as ke,ka as ue,kb as Ie,kd as Ze,la as me,ma as He,mb as p,o as De,oa as Qe,pa as A,rc as Z,rd as ee,sb as C,sc as we,t as pe,ta as m,tc as E,ua as _,ub as R,uc as J,va as W,vc as Ge,wb as N}from"./chunk-VS3RTXZC.js";import{a as Ee,b as Le}from"./chunk-SNAKHGZS.js";var At=`
|
|
2
2
|
.p-multiselect {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
cursor: pointer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-TS6CZC3J.js";var n=class{ID;VariantID;Quantity;Cost;Price;UnitPriceMinimum;Expense;UnitPriceOriginal;Discount;DiscountAmount;CouponDiscount;Note;Taxable;LoyaltyPoint;EntityID;UnitQuantity;VariantUnitQuantity;UnitQuantityPrice;PriceTypeID;PriceNote;Index;Splited;InventoryTypeID;TypeID;Variant;EntityName;SalesID;SalesName;PriceBookID;Serial;UnitExpense;UnitCost;UnitPrice;Checked;SplitQuantity;PurchaseOrderID;isMaxInventory;SerialSource;SalesCommission;isCopyPromotionName;isCopyProdDesc;get Total(){let t=this.GrossTotal-this.DiscountPercentAmount;this.validateDiscountAmount(t);let i=this.DiscountAmount*this.Quantity;return t-i}validateDiscountAmount(t){let i=this.Quantity%1===0;t>0&&this.DiscountAmount>t&&i&&(this.DiscountAmount=t)}get GrossTotal(){let t=this.Price*(this.Quantity*this.UnitQuantity);return t||0}get DiscountPercentAmount(){return this.Discount?this.GrossTotal*this.Discount/100:0}constructor(){this.EntityID=o.GuidEmpty,this.ID=o.GuidEmpty,this.Note="",this.SplitQuantity=0,this.SalesID="",this.Quantity=1}patchByVariant(t,i,e){this.PriceTypeID=t.PriceTypeID,this.Variant=t,this.VariantID=t.ID,this.isCopyPromotionName=e,this.isCopyProdDesc=i||this.isCopyProdDesc,this.SalesCommission=t.SalesCommission,this.UnitQuantity=t.UnitQuantity,t.UnitQuantity>1&&(this.UnitQuantityPrice=this.Variant.UnitPrice/this.Variant.UnitQuantity),this.Price=t.UnitPrice,this.UnitPrice=t.UnitPrice,this.UnitPriceMinimum=t.UnitPriceMinimum,this.Cost=t.UnitCost,this.UnitCost=t.UnitCost,this.Expense=t.UnitCost,this.Discount=t.PriceDiscount,this.UnitPriceOriginal=t.UnitPriceOriginal,this.DiscountAmount=0,this.CouponDiscount=0,this.Taxable=t.Taxable,this.InventoryTypeID=t.TypeID,this.LoyaltyPoint=t.LoyaltyPoint,this.VariantUnitQuantity=t.VariantUnitQuantity,this.SalesID="",this.setByVariantType(t),this.setItemNote(t)}patchByVariantAdjustment(t,i,e){this.PriceTypeID=t.PriceTypeID,this.Variant=t,this.VariantID=t.ID,this.isCopyPromotionName=e,this.isCopyProdDesc=this.isCopyProdDesc=i,this.setItemNote(t),this.UnitQuantity=t.UnitQuantity,t.UnitQuantity>1&&(this.UnitQuantityPrice=this.Variant.UnitPrice/this.Variant.UnitQuantity),this.Price=t.UnitPrice,this.UnitPrice=t.UnitPrice,this.UnitCost=t.UnitCost,this.Expense=t.UnitCost,this.Discount=t.PriceDiscount,this.UnitPriceOriginal=t.UnitPriceOriginal,this.DiscountAmount=0,this.Taxable=t.Taxable,this.InventoryTypeID=t.TypeID,this.LoyaltyPoint=t.LoyaltyPoint,this.VariantUnitQuantity=t.VariantUnitQuantity,this.SalesID="",this.setByVariantType(t),this.setItemNote(t)}setByVariantType(t){switch(t.TypeID){case 11:t.Config&&(this.Cost=this.Total/this.Quantity);break;case 4:this.Serial=t.Serial;break}}setItemNote(t){t.TypeID!=4&&(this.isCopyProdDesc&&(this.Note=t.Description),this.isCopyPromotionName&&o.IsNotEmpty(t.PriceNote)&&(this.Note=o.IsNotEmpty(t.PriceNote)?`${this.Note} ${t.PriceNote}`:this.Note,this.PriceNote=t.PriceNote))}pricebookUpdate(t,i,e){let s=this.getSelectedPricebook(t);s&&(this.PriceBookID=t,this.Price=s.UnitPrice,this.Discount=s.PriceDiscount,this.PriceTypeID=2,s.UnitCost==null?this.Cost=this.Variant.UnitCost:this.Cost=s.UnitCost,this.assignItemNote(s.Name,e),this.PriceNote=s.Name)}assignItemNote(t,i=!0){i&&(this.Note?.includes(this.PriceNote)?this.Note=this.Note?.replace(this.PriceNote,t):this.Note=`${t} ${this.Note?this.Note:""}`)}getSelectedPricebook(t){if(this.Variant.PriceBook){let i=this.Variant.PriceBook.filter(e=>e.ID==t);if(i.length)return i[0]}return null}checkMatchSerialWithQuantity(){let t=!0;if(this.isSerialType()){let i=this.Quantity,e=this.calculateSerialQty();i!==e&&(t=!1)}return t}calculateSerialQty(){let t=0;return this.Serial&&this.Serial.forEach(i=>{t+=i.Quantity}),t}isSerialType(){let t=!1;return this.Variant?.TypeID===4&&(t=!0),t}removeEnterNote(){this.Note&&(this.Note=this.Note.replace(/\n/g,""))}get getItemAfterDiscount(){let t=this.getDiscPercentagePerItem();return this.DiscountAmount<t?t-this.DiscountAmount:0}getDiscPercentagePerItem(){let t=this.Price;return this.Discount>0&&(t=(100-this.Discount)/100*this.Price),t}};var r=class extends n{PromotionGift;PromotionID;TotalWithoutDiscount;AvailableInventory;HasCustomerDiscount;constructor(){super(),this.PromotionGift=!1,this.isMaxInventory=!1}};export{n as a,r as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-5I74KDE7.js";import{a as f,d as h,e as U}from"./chunk-TS6CZC3J.js";import{Ma as d,Yd as N,ee as C,fa as T,la as u,oa as s,sd as v,ya as S}from"./chunk-VS3RTXZC.js";var O=(t=>(t[t.PAID=0]="PAID",t[t.OVERDUE=1]="OVERDUE",t[t.SELL_ONLY=2]="SELL_ONLY",t[t.SUSPENDED=3]="SUSPENDED",t))(O||{});var k=(()=>{let e=class e{constructor(i,t){this.document=i,this.platformId=t,this.documentIsAccessible=v(this.platformId)}static getCookieRegExp(i){let t=i.replace(/([[\]{}()|=;+?,.*^$\\])/gi,"\\$1");return new RegExp("(?:^"+t+"|;\\s*"+t+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(i){try{return decodeURIComponent(i)}catch{return i}}check(i){return this.documentIsAccessible?(i=encodeURIComponent(i),e.getCookieRegExp(i).test(this.document.cookie)):!1}get(i){if(this.check(i)){i=encodeURIComponent(i);let n=e.getCookieRegExp(i).exec(this.document.cookie);return n?.[1]?e.safeDecodeURIComponent(n[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let i={},t=this.document;return t.cookie&&t.cookie!==""&&t.cookie.split(";").forEach(n=>{let[c,a]=n.split("=");i[e.safeDecodeURIComponent(c.replace(/^ /,""))]=e.safeDecodeURIComponent(a)}),i}set(i,t,n,c,a,p,g,E){if(!this.documentIsAccessible)return;if(typeof n=="number"||n instanceof Date||c||a||p||g){let I={expires:n,path:c,domain:a,secure:p,sameSite:g||"Lax",partitioned:E};this.set(i,t,I);return}let m=encodeURIComponent(i)+"="+encodeURIComponent(t)+";",r=n||{};if(r.expires)if(typeof r.expires=="number"){let I=new Date(new Date().getTime()+r.expires*1e3*60*60*24);m+="expires="+I.toUTCString()+";"}else m+="expires="+r.expires.toUTCString()+";";r.path&&(m+="path="+r.path+";"),r.domain&&(m+="domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${i} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(m+="secure;"),r.sameSite||(r.sameSite="Lax"),m+="sameSite="+r.sameSite+";",r.partitioned&&(m+="Partitioned;"),this.document.cookie=m}delete(i,t,n,c,a="Lax"){if(!this.documentIsAccessible)return;let p=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(i,"",{expires:p,path:t,domain:n,secure:c,sameSite:a})}deleteAll(i,t,n,c="Lax"){if(!this.documentIsAccessible)return;let a=this.getAll();for(let p in a)a.hasOwnProperty(p)&&this.delete(p,i,t,n,c)}};e.\u0275fac=function(t){return new(t||e)(s(S),s(d))},e.\u0275prov=u({token:e,factory:e.\u0275fac,providedIn:"root"});let l=e;return l})();var D=class l{constructor(e,o,i,t,n,c){this.httpService=e;this.cookieService=o;this.router=i;this.roleService=t;this.intercomService=n;this.fraction=c}role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(e){this._returnUrl=e}get returnUrl(){return this._returnUrl}login(e){return this.httpService.post("/api/Login/Web",e).pipe(T(o=>{this._loginResponse=o,o.Type=="geo"||o.Type=="totp"||this.saveLoginConfigToStorage(o)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let e=this.getSubscriptionStatus(),o=this.getRedirectUrlByRole();return(e==2||e==3)&&(o="/menu/Profile/Main/My_Subscription"),o}getRedirectUrlByRole(){let e,o=this.roleService;return o.dashboard.View?e="/menu/Dashboard":o.product.View?e="/menu/Products":e="/menu/Sell",e}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(e=>{localStorage.removeItem("Token"),localStorage.setItem("Token",e.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let e=localStorage.getItem("Token");if(e){let o=f.parseJwt(e),i=this.convertUnixTimesTamp(o.exp),t=new Date;if(i.getTime()-t.getTime()>0)return!1}return!0}isInRole(e){e.forEach(o=>o(this.role))}convertUnixTimesTamp(e){return new Date(e*1e3)}saveLoginConfigToStorage(e){localStorage.setItem("quantityFraction",JSON.stringify(e.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(e.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(e.UIConfig.Fraction.Amount.Minimum,e.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(e.UIConfig.Fraction.Quantity.Minimum,e.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(e?.AccountInfo)),localStorage.setItem("Token",e?.Token),localStorage.setItem("TinyMCEPlugins",e?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(e?.Intercom),localStorage.setItem("CloudinaryConfig",e?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",e?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(e?.SubscriptionStatus));let o=this.getParseToken();f.IsNotEmpty(o?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",o?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let e=localStorage.getItem("Token");return e&&!this._jwtToken&&(this._jwtToken=f.parseJwt(e)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let e=localStorage.getItem("SubscriptionStatus");return e?parseInt(e):null}static \u0275fac=function(o){return new(o||l)(s(C),s(k),s(N),s(h),s(R),s(U))};static \u0275prov=u({token:l,factory:l.\u0275fac,providedIn:"root"})};export{O as a,k as b,D as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Z}from"./chunk-
|
|
1
|
+
import{c as Z}from"./chunk-HBH23XBO.js";import"./chunk-5I74KDE7.js";import{a as D}from"./chunk-TS6CZC3J.js";import"./chunk-7EVERJPZ.js";import{$ as C,Bc as I,Cc as k,Fb as o,Gb as e,Hb as f,Lb as w,Mb as M,N as b,Ob as S,Pb as x,Wa as l,Y as p,Ya as O,Yd as G,aa as m,ac as L,c as s,cb as c,cc as a,dc as h,ee as j,fa as _,gb as P,kd as A,n as v,rd as R,ta as E,ua as y,ub as g,wb as u}from"./chunk-VS3RTXZC.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function T(r,n){r&1&&(o(0,"div",13)(1,"span",20),a(2,"Latitude and Longitude is empty, please allow your browser location permission!"),e(),o(3,"a",21),a(4,"Click here to learn how to manually activate the location permission"),e()())}function z(r,n){if(r&1){let t=w();o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),a(4,"Geo Fencing"),e(),o(5,"p",4),a(6,"You are about to sign-in from this location"),e(),o(7,"div",5)(8,"div",6)(9,"div",7)(10,"span",8),a(11,"LAT"),e(),o(12,"span",9),a(13),e()(),o(14,"div",7)(15,"span",10),a(16,"LONG"),e(),o(17,"span",11),a(18),e()()(),o(19,"button",12),S("click",function(){E(t);let d=x();return y(d.proceed())}),a(20,"Proceed"),e()(),g(21,T,5,0,"div",13),e(),o(22,"div",14),f(23,"img",15),e()(),o(24,"div",16)(25,"div",17)(26,"div")(27,"span"),a(28,"powered by :"),e(),f(29,"a",18)(30,"img",19),e()()()()}if(r&2){let t=n,i=x();l(2),L(t.latitude&&t.longitude?i.centerGeoPanelStyle:""),l(11),h(t.latitude),l(5),h(t.longitude),l(),M("disabled",!(t.latitude&&t.longitude)),l(2),u(t.latitude&&t.longitude?-1:21)}}var N=class r{constructor(n,t,i,d){this.ngZone=n;this.auth=t;this.http=i;this.router=d}centerGeoPanelStyle="display: flex; flex-direction: column; justify-content: center;";latLong$;ngOnInit(){this.checkOnRefreshPage(),document.body.classList.add("login-body");let n=v(navigator.permissions.query({name:"geolocation"})).pipe(m(t=>new s(i=>{i.next(t.state),t.onchange=()=>this.ngZone.run(()=>i.next(t.state))})),p(1));this.latLong$=n.pipe(m(()=>new s(t=>{navigator.geolocation.getCurrentPosition(i=>this.ngZone.run(()=>{t.next({latitude:i.coords.latitude.toString(),longitude:i.coords.longitude.toString()}),t.complete()}),()=>this.ngZone.run(()=>{t.next({latitude:"",longitude:""}),t.complete()}),{enableHighAccuracy:!0,maximumAge:0,timeout:8e3})})),C({latitude:"",longitude:""}),p(1))}ngOnDestroy(){document.body.classList.remove("login-body")}checkOnRefreshPage(){D.IsEmpty(this.auth.loginResponse)&&this.router.navigate(["/"])}proceed(){this.latLong$.pipe(m(n=>this.http.post("/api/Authentication/LoginGeoRestriction",{UserID:this.auth.loginResponse.UserID,Latitude:n.latitude,Longitude:n.longitude})),_(n=>this.auth.saveLoginConfigToStorage(n)),m(()=>this.router.navigate([this.auth.getRedirectUrl()])),b(1)).subscribe()}static \u0275fac=function(t){return new(t||r)(c(O),c(Z),c(j),c(G))};static \u0275cmp=P({type:r,selectors:[["POS-auth-geolocation"]],decls:2,vars:3,consts:[[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-last","form-pane"],[1,"text-start"],[1,"text-start","mb-7"],[1,"d-flex","flex-column","flex-md-row",2,"column-gap","10px"],[1,"latlong-container","d-flex","flex-grow-1"],[1,"flex-grow-1","text-start","d-flex"],[1,"lat-label","fw-bold"],[1,"ps-5","lat-value","flex-grow-1","d-flex","align-items-center"],[1,"long-label","fw-bold"],[1,"ps-5","long-value","flex-grow-1","d-flex","align-items-center"],[1,"btn","btn-success","mt-5","mx-auto","mx-md-0","mt-md-0","w-25","w-md-100",3,"click","disabled"],[1,"text-start","mt-7"],[1,"col-md-5","order-md-last","order-first","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane","py-6"],["src","https://res.cloudinary.com/pos/image/upload/v1685343992/POS/Images/geolocation-map.png",1,"border-0","w-100"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"ms-3","border-0"],[1,"text-danger"],["href","https://support.dealpos.com/en/articles/7963864-enable-location-services-for-several-browser","target","_blank",1,"d-block"]],template:function(t,i){if(t&1&&(g(0,z,31,6,"div",0),I(1,"async")),t&2){let d;u((d=k(1,1,i.latLong$))?0:-1,d)}},dependencies:[R,A],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:2rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}.latlong-container[_ngcontent-%COMP%]{background:#fff;border:1px solid #000000;border-radius:5px}.latlong-container[_ngcontent-%COMP%] .lat-label[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{display:inline-block;padding:12px;border-right:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{border-left:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .lat-value[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-value[_ngcontent-%COMP%]{background:#d9d9d94d}"]})};export{N as AuthGeolocationComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne}from"./chunk-7NQ56KZ6.js";import{d as Se,e as xe}from"./chunk-MCPXNQRW.js";import{B as V,D as L,u as Me,v as ye,w as ve}from"./chunk-YFMVQJRL.js";import{N as we,O as q}from"./chunk-2525CDKJ.js";import{d as R}from"./chunk-UARWMJ5H.js";import{e as be,f as he}from"./chunk-TY7JJASH.js";import{A as pe,B as ge,F as Ce,G as fe,c as re,h as ae,i as le,k as de,o as se,p as ce,x as me,y as ue}from"./chunk-PRROMENK.js";import{a as ne}from"./chunk-ODGFQ7QJ.js";import{$ as K,A as k,Ab as c,Bb as d,Ca as J,Cb as l,D as U,Db as ee,Kb as v,Mb as O,Ob as g,Wa as a,Yb as M,ae as oe,bb as P,bc as m,bd as te,dc as x,de as _e,e as j,fb as Q,gb as X,gc as _,hc as b,ic as h,la as E,ma as z,nc as B,oa as S,q as A,qd as ie,sc as y,t as w,ta as u,tb as C,u as H,ua as p,vb as f,xb as Y,yb as Z,zb as $}from"./chunk-LBIXL2NM.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(oe))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new Ne;addCustomer(n,e){let t=[];n.Group&&t.push(n.Group),e&&(n.DebtLimit=e);let r={contact:n,groups:t};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",r)).catch(s=>Promise.reject(s))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(q.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(q.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(_e),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Ve=i=>({"border border-danger":i}),I=i=>({"is-invalid":i}),Le=i=>({"is-invalid border border-danger":i}),Fe=i=>({"has-error":i});function We(i,n){if(i&1){let e=v();d(0,"a",12),O("click",function(){u(e);let r=g();return p(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",y(1,T,e.tabState=="id"))}}function ke(i,n){if(i&1&&ee(0,"option",21),i&2){let e=n.$implicit;c("value",e.Name)}}function Be(i,n){if(i&1&&(d(0,"div",24)(1,"i",47),m(2," Name is mandatory."),l()()),i&2){g();let e=M(26);c("ngClass",y(1,Fe,e.touched&&e.invalid))}}function Re(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=M(38);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&(C(0,Re,2,0,"div",40),C(1,qe,2,1,"div",40)),i&2){g();let e=M(38);f(e.getError("required")&&!e.getError("minLength")?0:-1),a(),f(e.getError("minLength")?1:-1)}}function je(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function Ae(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function He(i,n){if(i&1&&(C(0,je,2,0,"div",40),C(1,Ae,2,0,"div",40)),i&2){g();let e=M(45);f(e.errors!=null&&e.errors.email?0:-1),a(),f(e.errors!=null&&e.errors.required?1:-1)}}function Ue(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ke(i,n){if(i&1&&C(0,Ue,2,0,"div",40),i&2){g();let e=M(3);f(e.invalid?0:-1)}}function ze(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"datepicker",48,6),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Birthdate,r)||(s.customer.Birthdate=r),p(r)}),l(),C(4,Ke,1,1),l()()}if(i&2){let e=M(3),t=g();a(2),_("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",y(4,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.dirty||e.touched?4:-1)}}function Je(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Qe(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Je,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Xe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Xe,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ze(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",52),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Group,r)||(s.customer.Group=r),p(r)}),l(),d(3,"label",53),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.Group))),a(),_("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function $e(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",54),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.City,r)||(s.customer.City=r),p(r)}),l(),d(3,"label",55),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.City))),a(),_("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function et(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function tt(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=M(68);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ie=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new Me,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new G,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ne.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(be),P(he),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:81,vars:55,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"btn","btn-link",3,"ngClass"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],[1,"col-4","mt-4"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"control-label","text-danger"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["for","code"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),O("onOk",function(){u(r);let o=M(4);return p(t.onOk(o))})("onCancel",function(){return u(r),p(t.dialogRef.close())})("onClose",function(){return u(r),p(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("detail"))}),m(10," Detail "),l(),C(11,We,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),h("ngModelChange",function(o){return u(r),b(t.customer.Title,o)||(t.customer.Title=o),p(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),Z(21,ke,1,1,"option",21,Y),l()()(),d(23,"div",22)(24,"div",17)(25,"input",23,1),h("ngModelChange",function(o){return u(r),b(t.customer.FirstName,o)||(t.customer.FirstName=o),p(o)}),l(),C(27,Be,3,3,"div",24),d(28,"label",25),m(29,"First Name"),l()()(),d(30,"div",22)(31,"div",17)(32,"input",26),h("ngModelChange",function(o){return u(r),b(t.customer.LastName,o)||(t.customer.LastName=o),p(o)}),l(),d(33,"label",27),m(34,"Last Name"),l()()(),d(35,"div",28)(36,"div",17)(37,"input",29,2),h("ngModelChange",function(o){return u(r),b(t.customer.Mobile,o)||(t.customer.Mobile=o),p(o)}),l(),C(39,Ge,2,2),d(40,"label",30),m(41,"Mobile"),l()()(),d(42,"div",28)(43,"div",17)(44,"input",31,3),h("ngModelChange",function(o){return u(r),b(t.customer.Email,o)||(t.customer.Email=o),p(o)}),l(),C(46,He,2,2),d(47,"label",32),m(48,"Email"),l()()(),C(49,ze,5,6,"div",33),C(50,Qe,7,9,"div",33),d(51,"div",28)(52,"ng-select",34),h("ngModelChange",function(o){return u(r),b(t.customer.Gender,o)||(t.customer.Gender=o),p(o)}),l()()(),d(53,"div",35),C(54,Ye,7,9,"div",36),C(55,Ze,5,5,"div",36),C(56,$e,5,5,"div",36),d(57,"div",37)(58,"div",17)(59,"textarea",38,4),h("ngModelChange",function(o){return u(r),b(t.customer.Address,o)||(t.customer.Address=o),p(o)}),l(),d(61,"label",39),m(62,"Address"),l(),C(63,et,2,0,"div",40),l()()(),d(64,"div",35)(65,"div",28)(66,"div",17)(67,"input",41,5),h("ngModelChange",function(o){return u(r),b(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),p(o)}),l(),C(69,tt,2,1,"div",40),d(70,"label",42),m(71,"National ID"),l()()(),d(72,"div",28)(73,"div",17)(74,"input",43),h("ngModelChange",function(o){return u(r),b(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),p(o)}),l(),d(75,"label",44),m(76,"Tax ID"),l()()(),d(77,"div",28)(78,"ng-select",45),h("ngModelChange",function(o){return u(r),b(t.customer.NationalityID,o)||(t.customer.NationalityID=o),p(o)}),l()(),d(79,"div",33)(80,"ng-select",46),h("ngModelChange",function(o){return u(r),b(t.customer.RaceID,o)||(t.customer.RaceID=o),p(o)}),l()()()()()()()()()}if(e&2){let r=M(26),s=M(38),o=M(45),N=M(60),D=M(68);c("config",t.modalConfig),a(7),c("ngClass",y(41,T,t.tabState=="general")),a(2),c("ngClass",y(43,T,t.tabState=="detail")),a(2),f(t.type!="supplier"?11:-1),a(3),c("hidden",t.tabState!="general"),a(3),_("ngModel",t.customer.Title),a(4),$(t.options==null?null:t.options.Titles),a(4),c("ngClass",y(45,Ve,r.touched&&r.invalid)),_("ngModel",t.customer.FirstName),c("required",!0),a(2),f(r.touched&&r.invalid?27:-1),a(5),_("ngModel",t.customer.LastName),a(5),_("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",y(47,I,s.invalid&&(s.dirty||s.touched))),a(2),f(s.invalid&&(s.dirty||s.touched)?39:-1),a(5),c("ngClass",y(49,Le,o.invalid&&(o.dirty||o.touched))),_("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),f(o.invalid&&(o.dirty||o.touched)?46:-1),a(3),f(t.type!="supplier"?49:-1),a(),f(t.type=="supplier"?50:-1),a(2),_("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),f(t.type!="supplier"?54:-1),a(),f(t.type!="supplier"?55:-1),a(),f(t.type!="supplier"?56:-1),a(3),c("rows",t.type!="supplier"?6:9),_("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",y(51,I,N.invalid&&(N.dirty||N.touched))),a(4),f(N.invalid&&(N.dirty||N.touched)?63:-1),a(),c("hidden",t.tabState!="id"),a(3),_("ngModel",t.customer.NationalIDNumber),c("ngClass",y(53,I,D.invalid&&(D.dirty||D.touched))),a(2),f(D.invalid&&(D.dirty||D.touched)?69:-1),a(5),_("ngModel",t.customer.TaxIDNumber),a(4),_("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),_("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[te,ye,ce,me,ue,re,ae,le,pe,ge,se,de,Se,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[ie,we,ve,Ce,fe,xe,R]})},G=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ie as c,Oe as d,G as e};
|
|
1
|
+
import{a as Ne}from"./chunk-3CZ6HKSM.js";import{d as Se,e as xe}from"./chunk-I4WJ5CEN.js";import{B as V,D as L,u as Me,v as ye,w as ve}from"./chunk-EGUIWOC3.js";import{N as we,O as q}from"./chunk-HYXSN2J6.js";import{d as R}from"./chunk-2JU7KFOZ.js";import{e as be,f as he}from"./chunk-QGYIPOLS.js";import{A as pe,B as ge,F as Ce,G as fe,c as re,h as ae,i as le,k as de,o as se,p as ce,x as me,y as ue}from"./chunk-OJ5SEYSF.js";import{a as ne}from"./chunk-TS6CZC3J.js";import{$ as K,A as k,Ab as $,Bb as c,Ca as J,Cb as d,D as U,Db as l,Eb as ee,Lb as v,Nb as O,Pb as g,Wa as a,Zb as M,be as oe,cb as P,cc as m,cd as te,e as j,ec as x,ee as _e,gb as Q,hb as X,hc as _,ic as b,jc as h,la as E,ma as z,oa as S,oc as B,q as A,rd as ie,t as w,ta as u,tc as y,u as H,ua as p,ub as C,wb as f,yb as Y,zb as Z}from"./chunk-VS3RTXZC.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(oe))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new Ne;addCustomer(n,e){let t=[];n.Group&&t.push(n.Group),e&&(n.DebtLimit=e);let r={contact:n,groups:t};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",r)).catch(s=>Promise.reject(s))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(q.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(q.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(_e),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Ve=i=>({"border border-danger":i}),I=i=>({"is-invalid":i}),Le=i=>({"is-invalid border border-danger":i}),Fe=i=>({"has-error":i});function We(i,n){if(i&1){let e=v();d(0,"a",12),O("click",function(){u(e);let r=g();return p(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",y(1,T,e.tabState=="id"))}}function ke(i,n){if(i&1&&ee(0,"option",21),i&2){let e=n.$implicit;c("value",e.Name)}}function Be(i,n){if(i&1&&(d(0,"div",24)(1,"i",47),m(2," Name is mandatory."),l()()),i&2){g();let e=M(26);c("ngClass",y(1,Fe,e.touched&&e.invalid))}}function Re(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=M(38);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&(C(0,Re,2,0,"div",40),C(1,qe,2,1,"div",40)),i&2){g();let e=M(38);f(e.getError("required")&&!e.getError("minLength")?0:-1),a(),f(e.getError("minLength")?1:-1)}}function je(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function Ae(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function He(i,n){if(i&1&&(C(0,je,2,0,"div",40),C(1,Ae,2,0,"div",40)),i&2){g();let e=M(45);f(e.errors!=null&&e.errors.email?0:-1),a(),f(e.errors!=null&&e.errors.required?1:-1)}}function Ue(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ke(i,n){if(i&1&&C(0,Ue,2,0,"div",40),i&2){g();let e=M(3);f(e.invalid?0:-1)}}function ze(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"datepicker",48,6),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Birthdate,r)||(s.customer.Birthdate=r),p(r)}),l(),C(4,Ke,1,1),l()()}if(i&2){let e=M(3),t=g();a(2),_("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",y(4,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.dirty||e.touched?4:-1)}}function Je(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Qe(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Je,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Xe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Xe,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ze(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",52),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Group,r)||(s.customer.Group=r),p(r)}),l(),d(3,"label",53),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.Group))),a(),_("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function $e(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",54),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.City,r)||(s.customer.City=r),p(r)}),l(),d(3,"label",55),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.City))),a(),_("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function et(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function tt(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=M(68);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ie=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new Me,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new G,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ne.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(be),P(he),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:81,vars:55,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"btn","btn-link",3,"ngClass"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],[1,"col-4","mt-4"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"control-label","text-danger"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["for","code"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),O("onOk",function(){u(r);let o=M(4);return p(t.onOk(o))})("onCancel",function(){return u(r),p(t.dialogRef.close())})("onClose",function(){return u(r),p(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("detail"))}),m(10," Detail "),l(),C(11,We,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),h("ngModelChange",function(o){return u(r),b(t.customer.Title,o)||(t.customer.Title=o),p(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),Z(21,ke,1,1,"option",21,Y),l()()(),d(23,"div",22)(24,"div",17)(25,"input",23,1),h("ngModelChange",function(o){return u(r),b(t.customer.FirstName,o)||(t.customer.FirstName=o),p(o)}),l(),C(27,Be,3,3,"div",24),d(28,"label",25),m(29,"First Name"),l()()(),d(30,"div",22)(31,"div",17)(32,"input",26),h("ngModelChange",function(o){return u(r),b(t.customer.LastName,o)||(t.customer.LastName=o),p(o)}),l(),d(33,"label",27),m(34,"Last Name"),l()()(),d(35,"div",28)(36,"div",17)(37,"input",29,2),h("ngModelChange",function(o){return u(r),b(t.customer.Mobile,o)||(t.customer.Mobile=o),p(o)}),l(),C(39,Ge,2,2),d(40,"label",30),m(41,"Mobile"),l()()(),d(42,"div",28)(43,"div",17)(44,"input",31,3),h("ngModelChange",function(o){return u(r),b(t.customer.Email,o)||(t.customer.Email=o),p(o)}),l(),C(46,He,2,2),d(47,"label",32),m(48,"Email"),l()()(),C(49,ze,5,6,"div",33),C(50,Qe,7,9,"div",33),d(51,"div",28)(52,"ng-select",34),h("ngModelChange",function(o){return u(r),b(t.customer.Gender,o)||(t.customer.Gender=o),p(o)}),l()()(),d(53,"div",35),C(54,Ye,7,9,"div",36),C(55,Ze,5,5,"div",36),C(56,$e,5,5,"div",36),d(57,"div",37)(58,"div",17)(59,"textarea",38,4),h("ngModelChange",function(o){return u(r),b(t.customer.Address,o)||(t.customer.Address=o),p(o)}),l(),d(61,"label",39),m(62,"Address"),l(),C(63,et,2,0,"div",40),l()()(),d(64,"div",35)(65,"div",28)(66,"div",17)(67,"input",41,5),h("ngModelChange",function(o){return u(r),b(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),p(o)}),l(),C(69,tt,2,1,"div",40),d(70,"label",42),m(71,"National ID"),l()()(),d(72,"div",28)(73,"div",17)(74,"input",43),h("ngModelChange",function(o){return u(r),b(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),p(o)}),l(),d(75,"label",44),m(76,"Tax ID"),l()()(),d(77,"div",28)(78,"ng-select",45),h("ngModelChange",function(o){return u(r),b(t.customer.NationalityID,o)||(t.customer.NationalityID=o),p(o)}),l()(),d(79,"div",33)(80,"ng-select",46),h("ngModelChange",function(o){return u(r),b(t.customer.RaceID,o)||(t.customer.RaceID=o),p(o)}),l()()()()()()()()()}if(e&2){let r=M(26),s=M(38),o=M(45),N=M(60),D=M(68);c("config",t.modalConfig),a(7),c("ngClass",y(41,T,t.tabState=="general")),a(2),c("ngClass",y(43,T,t.tabState=="detail")),a(2),f(t.type!="supplier"?11:-1),a(3),c("hidden",t.tabState!="general"),a(3),_("ngModel",t.customer.Title),a(4),$(t.options==null?null:t.options.Titles),a(4),c("ngClass",y(45,Ve,r.touched&&r.invalid)),_("ngModel",t.customer.FirstName),c("required",!0),a(2),f(r.touched&&r.invalid?27:-1),a(5),_("ngModel",t.customer.LastName),a(5),_("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",y(47,I,s.invalid&&(s.dirty||s.touched))),a(2),f(s.invalid&&(s.dirty||s.touched)?39:-1),a(5),c("ngClass",y(49,Le,o.invalid&&(o.dirty||o.touched))),_("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),f(o.invalid&&(o.dirty||o.touched)?46:-1),a(3),f(t.type!="supplier"?49:-1),a(),f(t.type=="supplier"?50:-1),a(2),_("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),f(t.type!="supplier"?54:-1),a(),f(t.type!="supplier"?55:-1),a(),f(t.type!="supplier"?56:-1),a(3),c("rows",t.type!="supplier"?6:9),_("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",y(51,I,N.invalid&&(N.dirty||N.touched))),a(4),f(N.invalid&&(N.dirty||N.touched)?63:-1),a(),c("hidden",t.tabState!="id"),a(3),_("ngModel",t.customer.NationalIDNumber),c("ngClass",y(53,I,D.invalid&&(D.dirty||D.touched))),a(2),f(D.invalid&&(D.dirty||D.touched)?69:-1),a(5),_("ngModel",t.customer.TaxIDNumber),a(4),_("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),_("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[te,ye,ce,me,ue,re,ae,le,pe,ge,se,de,Se,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[ie,we,ve,Ce,fe,xe,R]})},G=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ie as c,Oe as d,G as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{O as b}from"./chunk-
|
|
1
|
+
import{O as b}from"./chunk-HYXSN2J6.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-7EVERJPZ.js";import{be as d,ee as h,la as n,pa as c}from"./chunk-VS3RTXZC.js";import{k as l}from"./chunk-SNAKHGZS.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
|
|
2
2
|
`,"WhatsApp not installed")},2e3)}copyToClipboard(t){return new Promise((o,r)=>this.copyToClipBoard.copy(t).then(()=>{this.toastr.info("Message copied to clipboard. If WhatsApp doesn't show the message, please paste it manually.","Receipt Ready",{timeOut:8e3}),o("Copied to clipboard")}).catch(e=>{console.log(e),this.toastr.warning("Could not copy message to clipboard","Clipboard Error",{timeOut:8e3}),r(e)}))}sendReceiptToWhatsapp(t,o,r,e){return l(this,null,function*(){try{let i=this.createWhatsappReceipt(o,r,e);try{yield this.copyToClipboard(i)}finally{this.redirectToWhatsapp(t,i)}}catch(i){console.warn(i),this.toastr.error("Failed to send receipt")}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac})};export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as v,a as P,b as y,h as k,o as w}from"./chunk-
|
|
1
|
+
import{F as v,a as P,b as y,h as k,o as w}from"./chunk-OJ5SEYSF.js";import{Bb as f,Ca as c,Cb as i,Db as s,Eb as d,Lb as m,Nb as b,Wa as p,gb as C,hc as M,ic as _,jc as h,ka as u,rc as O,ta as a,ua as r}from"./chunk-VS3RTXZC.js";var x=class l{disabled=c(!1);value=c(!1);onToggleChange(e){this.onChange(e)}onChange=e=>{};onTouched=()=>{};setDisabledState(e){this.disabled.set(e)}writeValue(e){this.value.set(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=C({type:l,selectors:[["app-customize-toggle"]],features:[O([{provide:P,useExisting:u(()=>l),multi:!0}])],decls:8,vars:2,consts:[["inp",""],[1,"switch"],["type","checkbox","id","togBtn",3,"ngModelChange","disabled","ngModel"],[1,"slider","round"],[1,"on","toggle-label-text"],[1,"fa-solid","fa-check"],[1,"off","toggle-label-text"],[1,"fa-solid","fa-xmark"]],template:function(o,n){if(o&1){let g=m();i(0,"label",1)(1,"input",2,0),h("ngModelChange",function(t){return a(g),_(n.value,t)||(n.value=t),r(t)}),b("ngModelChange",function(t){return a(g),r(n.onToggleChange(t))}),s(),i(3,"div",3)(4,"span",4),d(5,"i",5),s(),i(6,"span",6),d(7,"i",7),s()()()}o&2&&(p(),f("disabled",n.disabled()),M("ngModel",n.value))},dependencies:[v,y,k,w],styles:['.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;width:60px;height:30px}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:none}.slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;inset:0;background-color:#ca2222;-webkit-transition:.3s;transition:.3s}.slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:26px;width:26px;left:2px;bottom:2px;background-color:#fff;-webkit-transition:.3s;transition:.3s}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background-color:#2ab934}input[_ngcontent-%COMP%]:focus + .slider[_ngcontent-%COMP%]{box-shadow:0 0 1px #2196f3}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{-webkit-transform:translateX(30px);-ms-transform:translateX(30px);transform:translate(30px)}.on[_ngcontent-%COMP%]{display:none}.toggle-label-text[_ngcontent-%COMP%]{color:#fff;position:absolute;transform:translate(-50%,-50%);top:50%;font-size:14px;font-family:Verdana,sans-serif}.on[_ngcontent-%COMP%]{right:55%}.off[_ngcontent-%COMP%]{left:68%}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%] .on[_ngcontent-%COMP%]{display:block}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%] .off[_ngcontent-%COMP%]{display:none}.slider.round[_ngcontent-%COMP%]{border-radius:34px}.slider.round[_ngcontent-%COMP%]:before{border-radius:50%}input[_ngcontent-%COMP%]:disabled + .slider[_ngcontent-%COMP%]{background-color:#e6e6e6}input[_ngcontent-%COMP%]:disabled + .slider[_ngcontent-%COMP%]:before{background-color:#ccc}input[_ngcontent-%COMP%]:disabled + .slider[_ngcontent-%COMP%] .on[_ngcontent-%COMP%], input[_ngcontent-%COMP%]:disabled + .slider[_ngcontent-%COMP%] .off[_ngcontent-%COMP%]{color:#aaa}input[_ngcontent-%COMP%]:disabled:checked + .slider[_ngcontent-%COMP%]{background-color:#e6e6e6}']})};export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ee as v,la as y,pa as d}from"./chunk-VS3RTXZC.js";import{a as c,b as f}from"./chunk-SNAKHGZS.js";var h=class o{httpService=d(v);checkForAdvancedColumn(e,n,I,s="ID",P){for(let t in e)if(e[t].hasOwnProperty("advanced")&&e[t].selected){let a=n.filter(r=>!r.hasOwnProperty(e[t].responseProperty)||r[e[t].responseProperty]==null||r[e[t].responseProperty]==null);a.length>0&&this.httpService.post(e[t].endpoint,f(c({},I),{DynamicColumnIDs:a.map(r=>r.ID)})).subscribe(r=>{let p=0;n=n.map(i=>(p=r.findIndex(m=>m[s]===i[s]),p!=-1&&(i[e[t].responseProperty]=r[p][e[t].responseProperty]),i)),P?.(r)})}}static \u0275fac=function(n){return new(n||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-NQX7EX5A.js";import{a as oe}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-NQX7EX5A.js";import{a as oe}from"./chunk-GDPQI6PI.js";import{a as te,c as ie,e as ne,f as re,g as ae}from"./chunk-MREFZR3I.js";import{a as X}from"./chunk-CKGJCUHW.js";import{a as Y,c as Z}from"./chunk-AASKAWJ4.js";import{m as U}from"./chunk-EGUIWOC3.js";import{N as ee}from"./chunk-HYXSN2J6.js";import{d as D}from"./chunk-2JU7KFOZ.js";import{a as J}from"./chunk-2FWFPV5I.js";import{F as z,c as K,h as G,o as q}from"./chunk-OJ5SEYSF.js";import{a as $}from"./chunk-TS6CZC3J.js";import{Ab as v,Bb as f,Bc as T,Cb as a,Cc as A,Db as l,Dc as B,Eb as S,Lb as C,Nb as h,Pb as d,Wa as s,Xa as g,Y as P,Zb as x,be as j,cb as y,cc as p,dc as R,ec as w,fa as O,gb as F,hb as Q,hc as E,ic as M,jc as V,kd as H,ma as k,md as L,rd as W,t as N,ta as m,ua as c,ub as u,wb as _,yb as b,zb as I}from"./chunk-VS3RTXZC.js";function ce(i,t){i&1&&(a(0,"div",3)(1,"div",6),p(2,"Edit Serial is disabled during EDIT MODE"),l(),a(3,"div"),p(4," If you make a mistake, please delete the item and then add again "),l()())}function pe(i,t){if(i&1){let e=C();a(0,"mat-chip-row",17),h("removed",function(){let r=m(e).$implicit,o=d(3);return c(o.onRemoveSerialChip(r))}),p(1),a(2,"button",18),S(3,"i",19),l()()}if(i&2){let e=t.$implicit;s(),w(" ",e," ")}}function ue(i,t){if(i&1){let e=C();a(0,"div",8)(1,"div",10)(2,"mat-form-field",11),h("keyup.enter",function(r){return m(e),c(r.stopPropagation())}),a(3,"mat-chip-grid",null,0),I(5,pe,4,1,"mat-chip-row",null,b),a(7,"input",12,1),h("matChipInputTokenEnd",function(r){m(e);let o=x(8),me=d(2);return c(me.addSerial(r,o))}),l()()()(),a(9,"div",13)(10,"button",14),h("click",function(){m(e);let r=x(8),o=d(2);return c(o.submitSerial(r))}),S(11,"i",15),a(12,"strong",16),p(13,"ADD"),l()()()()}if(i&2){let e=x(4),n=d(2);s(5),v(n.serials),s(2),f("matChipInputFor",e)("matChipInputSeparatorKeyCodes",n.separatorKeysCodes)}}function _e(i,t){if(i&1){let e=C();a(0,"ng-select",20),T(1,"async"),V("ngModelChange",function(r){m(e);let o=d(2);return M(o.serials,r)||(o.serials=r),c(r)}),h("remove",function(r){m(e);let o=d(2);return c(o.onRemoveSerialFromOption(r.value))})("change",function(r){m(e);let o=d(2);return c(o.onSelectSerial(r))}),l()}if(i&2){let e=d(2);f("items",A(1,3,e.serials$)),E("ngModel",e.serials),f("multiple",!0)}}function he(i,t){if(i&1&&(a(0,"div",4)(1,"div",7),u(2,ue,14,2,"div",8)(3,_e,2,5,"ng-select",9),l()()),i&2){let e=d();s(2),_(e.isReturn?2:3)}}function Ce(i,t){i&1&&S(0,"th",23)}function fe(i,t){i&1&&(a(0,"th",25),p(1,"Expiry Date"),l())}function Se(i,t){if(i&1){let e=C();a(0,"td",27)(1,"i",29),h("click",function(){m(e);let r=d().$index,o=d(2);return c(o.onRemoveSerial(r))}),l()()}}function xe(i,t){if(i&1&&(a(0,"td"),p(1),T(2,"date"),l()),i&2){let e=d().$implicit;s(),w(" ",e.ExpiryDate?B(2,1,e.ExpiryDate,"dd MMM yyyy"):"-"," ")}}function ge(i,t){if(i&1){let e=C();a(0,"tr"),u(1,Se,2,0,"td",27),a(2,"td"),p(3),l(),u(4,xe,3,4,"td"),a(5,"td")(6,"input",28),V("ngModelChange",function(r){let o=m(e).$implicit;return M(o.Quantity,r)||(o.Quantity=r),c(r)}),h("change",function(){m(e);let r=d(2);return c(r.onChangeQty())}),l()()()}if(i&2){let e=t.$implicit,n=d(2);s(),_(n.disabled?-1:1),s(2),R(e.Number),s(),_(n.showExpiryDate?4:-1),s(2),E("ngModel",e.Quantity),f("disabled",n.disabled)("decimalPlaces",0)}}function ye(i,t){if(i&1&&(a(0,"div",5)(1,"div",7)(2,"table",21)(3,"thead",22)(4,"tr"),u(5,Ce,1,0,"th",23),a(6,"th",24),p(7,"Serial Number"),l(),u(8,fe,2,0,"th",25),a(9,"th",26),p(10,"Quantity"),l()()(),a(11,"tbody"),I(12,ge,7,6,"tr",null,b),l()()()()),i&2){let e=d();s(5),_(e.disabled?-1:5),s(3),_(e.showExpiryDate?8:-1),s(4),v(e.selectedSerial)}}var se=class i{constructor(t,e){this.productService=t;this.toastr=e;this.cartItemChange=new g,this.serialsChange=new g}separatorKeysCodes=[13,188];_cartItem;isReturn=!1;disabled=!1;set cartItem(t){t&&(this._cartItem=t,this.initSelectedSerial(),t.Quantity<0?this.isReturn=!0:this.getSerialVariant())}get cartItem(){return this._cartItem}cartItemChange;entityId;serials;serialsChange;serials$;selectedSerial=[];showExpiryDate;ngOnDestroy(){this.serialsChange.emit([])}initSelectedSerial(){let t=this.cartItem.Serial;t&&t.length>0&&(this.selectedSerial=t,this.checkShowExpiryDate())}getSerialVariant(){let t=this.cartItem.VariantID,e;this.serials$=this.productService.getVariantSerial(this.entityId,t).pipe(N(n=>n.map(r=>(e=new le,e.Number=r.Number,e.Quantity=r.Quantity?r.Quantity:1,e.ExpiryDate=r.ExpiryDate,e))),O(()=>{this.isReturn||(this.serials=this.generateSerialCode(this.selectedSerial))}),P())}generateSerialCode(t=[]){return t.map(e=>e.Number)}onSelectSerial(t){let e=t.filter(n=>this.selectedSerial.findIndex(r=>r.Number==n.Number)==-1);e.length>0&&(e[0].Quantity=1,this.selectedSerial=[...this.selectedSerial,...e],this.updateCartItem())}onRemoveSerial(t){this.selectedSerial=this.selectedSerial.filter((e,n)=>n!==t),this.serials=this.generateSerialCode(this.selectedSerial),this.updateCartItem()}onRemoveSerialChip(t){this.serials=this.serials.filter(e=>e!==t),this.serialsChange.emit(this.serials)}onRemoveSerialFromOption(t){this.selectedSerial=this.selectedSerial.filter(e=>e.Number!==t.Number),this.serials=this.generateSerialCode(this.selectedSerial)}onChangeQty(){this.updateCartItem()}submitSerial(t){t.value.trim()&&(this.serials.push(t.value.trim()),t.value="");let e=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...e],this.serials=[],this.updateCartItem()}generateSerialData(){return this.serials.filter(e=>this.selectedSerial.findIndex(n=>n.Number==e)==-1).map(e=>({Number:e,Quantity:this.isReturn?-1:1,ExpiryDate:null}))}addSerial(t,e){let n=(t.value||"").trim();if(n)if(this.serials.find(r=>r==n)){e.value="",this.toastr.info("Serial already exists",J.Info);return}else this.serials.push(n),this.serialsChange.emit(this.serials);t.chipInput.clear()}updateCartItem(){this.cartItem.Serial=this.selectedSerial,this.checkShowExpiryDate(),this.calculateSerialQty(),this.cartItemChange.emit(this.cartItem)}calculateSerialQty(){let t=0;this.selectedSerial.forEach(e=>{t+=e.Quantity}),this.cartItem.Quantity=t}checkShowExpiryDate(){let t=0;this.selectedSerial.forEach(e=>{$.IsNotEmpty(e.ExpiryDate)&&(t+=1)}),this.showExpiryDate=t>0}static \u0275fac=function(e){return new(e||i)(y(oe),y(j))};static \u0275cmp=F({type:i,selectors:[["app-item-serial"]],inputs:{disabled:"disabled",cartItem:"cartItem",entityId:"entityId",serials:"serials"},outputs:{cartItemChange:"cartItemChange",serialsChange:"serialsChange"},standalone:!1,decls:4,vars:3,consts:[["chipGrid",""],["inputChip",""],[1,"my-8"],[1,"alert","alert-warning","text-center","my-5","py-3"],[1,"row"],[1,"row","mt-8"],[1,"fw-bold"],[1,"col-12"],[1,"input-group","mb-3"],["bindLabel","Number","appendTo","body","bindValue","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"items","ngModel","multiple"],[1,"col"],["appearance","outline",1,"serial-chip",3,"keyup.enter"],["placeholder","E.g. Serial1 Serial2",3,"matChipInputTokenEnd","matChipInputFor","matChipInputSeparatorKeyCodes"],[1,"col-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm","add-chip",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-1","fs-6"],[1,"headings-font-family","h6","font-weight-bold"],[3,"removed"],["matChipRemove",""],[1,"fa-solid","fa-circle-xmark"],["bindLabel","Number","appendTo","body","bindValue","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"ngModelChange","remove","change","items","ngModel","multiple"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end",2,"width","40px"],[1,"border-end"],[1,"border-end",2,"width","100px"],[1,"border-end","text-end",2,"width","60px"],[1,"text-center"],["type","text","placeholder","Serial Quantity","autoNum","",1,"form-control","text-end",3,"ngModelChange","change","ngModel","disabled","decimalPlaces"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"]],template:function(e,n){e&1&&(a(0,"div",2),u(1,ce,5,0,"div",3),u(2,he,4,1,"div",4),u(3,ye,14,2,"div",5),l()),e&2&&(s(),_(n.disabled?1:-1),s(),_(n.disabled?-1:2),s(),_(n.selectedSerial.length>0?3:-1))},dependencies:()=>[D,K,G,q,Z,ne,re,te,ie,U,H,L],styles:[".serial-chip[_ngcontent-%COMP%]{width:100%}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input, .serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:40px!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading{border-color:#ccc!important}.serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.add-chip[_ngcontent-%COMP%]{height:calc(100% - 18.4px);margin-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}"]})},de=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Q({type:i});static \u0275inj=k({imports:[W,ee,D,z,Y,ae,X]})};export{se as a,de as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as te,b as ie,c as oe}from"./chunk-
|
|
1
|
+
import{a as te,b as ie,c as oe}from"./chunk-67UQKMLX.js";import{a as pe,c as ce}from"./chunk-AASKAWJ4.js";import{u as se,v as me,w as de}from"./chunk-EGUIWOC3.js";import{b as Z,c as ee}from"./chunk-VQBUIUJC.js";import{a as le,d as re}from"./chunk-2JU7KFOZ.js";import{e as ne,f as ae}from"./chunk-QGYIPOLS.js";import{F as Y,c as q,h as K,o as Q}from"./chunk-OJ5SEYSF.js";import{Ab as H,Bb as u,Bc as M,Cb as l,Cc as v,Db as r,Eb as f,Lb as T,Nb as y,Pb as m,Wa as p,Y as F,aa as L,bc as z,cb as _,cc as s,d as I,dc as O,ec as B,ee as E,fa as w,fc as G,gb as J,hc as R,ic as D,jc as A,kd as W,la as P,mb as k,oa as V,od as U,rd as $,t as b,ta as C,ua as h,ub as d,wb as c,yb as j,zb as X}from"./chunk-VS3RTXZC.js";import{a as x,b as g}from"./chunk-SNAKHGZS.js";var S=class o{constructor(t){this.http=t}exportCSV(t,e){let i=g(x({},e),{Export:!0});this.downloadFile(t,i)}exportCustom(t,e,i){let a=g(x({},e),{Export:!0,FormatType:i});this.downloadFile(t,a)}exportCSVIds(t,e){this.downloadFile(t,e)}exportXlsx(t,e){let i=g(x({},e),{FormatType:1});this.downloadFile(t,i)}downloadFile(t,e){this.http.postFile(`/api/${t}`,e).subscribe(i=>{let a=window.URL.createObjectURL(i.file),n=document.createElement("a");n.download=this.getFilenameFromContentDisposition(i.title),n.href=a,n.click(),URL.revokeObjectURL(a),n.remove()})}getFilenameFromContentDisposition(t){let i=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return i!=null&&i[1]?i[1].replace(/['"]/g,""):""}exportJSON(t,e,i){this.http.post(`/api/${t}`,i).subscribe(a=>{var n=JSON.stringify(a,null," ");this.downloadJSON(n,e+".json")})}downloadJSON(t,e){var i=new Blob([t],{type:"data:application/json;charset=utf-8"}),a=document.createElement("a");a.setAttribute("href",window.URL.createObjectURL(i)),a.setAttribute("download",e),document.body.appendChild(a),a.click(),document.body.removeChild(a)}static \u0275fac=function(e){return new(e||o)(V(E))};static \u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"})};function Ce(o,t){if(o&1&&(l(0,"div",13),s(1),r()),o&2){let e=t.item;u("matTooltip",e.Tooltip),p(),B(" ",e.Value," ")}}function he(o,t){if(o&1){let e=T();l(0,"div",9),s(1," Columns "),r(),l(2,"div",10)(3,"ng-select",11),A("ngModelChange",function(a){C(e);let n=m();return D(n.exportType,a)||(n.exportType=a),h(a)}),y("change",function(a){C(e);let n=m();return h(n.onChangeExportType(a))}),k(4,Ce,2,2,"ng-template",12),r()()}if(o&2){let e=m();p(3),u("items",e.exportTypes),R("ngModel",e.exportType)}}function _e(o,t){o&1&&(l(0,"mat-button-toggle",6),f(1,"i",14),s(2,"CSV"),r())}function ye(o,t){o&1&&(l(0,"mat-button-toggle",7),f(1,"i",15),s(2,"XLSX"),r())}function be(o,t){if(o&1&&(l(0,"mat-button-toggle",16),f(1,"i",17),s(2),r()),o&2){let e=m().$implicit;u("value",e.value),p(),z(e.icon),p(),O(e.label)}}function Te(o,t){if(o&1&&d(0,be,3,4,"mat-button-toggle",16),o&2){let e=m();c(e.allowTxtOption()||e.isTextOnly()?0:-1)}}function Me(o,t){o&1&&(l(0,"mat-button-toggle",8),f(1,"i",18),s(2,"JSON"),r())}function ve(o,t){if(o&1){let e=T();l(0,"i",26),y("click",function(){C(e);let a=m(3);return h(a.onGetAllDataLength())}),r()}}function Ee(o,t){if(o&1&&(l(0,"span"),s(1,"of "),d(2,ve,1,0,"i",24),l(3,"span",25),s(4),M(5,"async"),r(),s(6," page(s)"),r()),o&2){let e=m(2);p(2),c(e.calledApiCount?-1:2),p(2),O(e.calledApiCount?v(5,2,e.allDataLength$):"")}}function Se(o,t){if(o&1){let e=T();l(0,"div",3),s(1," Page "),r(),l(2,"div",19)(3,"input",20),y("ngModelChange",function(a){C(e);let n=m();return h(n.pageNumber=a)}),r(),d(4,Ee,7,4,"span"),r(),l(5,"div",21)(6,"div",22),f(7,"i",23),s(8),M(9,"number"),M(10,"number"),r()()}if(o&2){let e=m();p(3),u("ngModel",e.pageNumber),p(),c(e.getAllDataLengthAPI?4:-1),p(4),G(" Exporting data from ",v(9,4,e.displayedMinRangeRow)," - ",e.exportFormat=="JSON"?"1,000":v(10,6,e.displayedMaxRangeRow)," ")}}var xe=class o{constructor(t,e,i,a){this.data=t;this.dialogRef=e;this.exportHandler=a;this.config.title=`Export ${t.title}`,this.config.hideCancel=!0,this.config.customWidth="450px",this.exportTypes=t.exportTypes,this.exportType=this.exportTypes[0].ID,this.filterExport=t.filterExport,this.pagination=t.pagination,this.getAllDataLengthAPI=t.getAllDataLengthAPI,this.extraExportTypesOptions=t.extraExportTypesOptions,this.allDataLength$=this.onGetAllDataLength$.pipe(b(()=>this.exportTypes.find(n=>n.ID==this.exportType)?.Count??this.getAllDataLengthAPI),L(n=>i.post("/API/"+n,this.filterExport)),b(n=>typeof n=="number"?n:n.Count),w(n=>{n<this.displayedMaxRangeRow&&this.setMinMaxRangeDisplayedRow(n),this.calledApiCount=!0}),b(n=>{let N=this.exportFormat=="JSON"?1e3:this.pageSize;return Math.floor(n/N)+(n%N>0?1:0)}),F(1),w(console.log)),this.allDataLength$.subscribe()}pageNumber=1;pageSize=1e4;config=new se;exportTypes=[];exportType;exportFormat="CSV";_onGetAllDataLength=new I;onGetAllDataLength$=this._onGetAllDataLength.asObservable();allDataLength$;calledApiCount=!1;filterExport;displayedMaxRangeRow=this.pageSize;displayedMinRangeRow=this.pageNumber;pagination;getAllDataLengthAPI="";extraExportTypesOptions=[];onOk(){this.filterExport=g(x({},this.filterExport),{Export:!0}),this.pagination&&(this.filterExport=g(x({},this.filterExport),{ExportPageNumber:this.pageNumber,ExportRowCount:this.pageSize})),this.exportFormat=="CSV"?this.exportHandler.exportCSV(this.exportType,this.filterExport):this.exportFormat=="XLSX"?this.exportHandler.exportXlsx(this.exportType,this.filterExport):this.exportFormat=="JSON"?this.exportHandler.exportJSON(this.data.JSONAPI,this.data.JSONFileName,g(x({},this.filterExport),{ExportRowCount:1e3})):this.exportHandler.exportCustom(this.exportType,this.filterExport,2),this.dialogRef.close()}onGetAllDataLength(){this._onGetAllDataLength.next()}onChangePageNumber(){this.setDisplayedMinMaxRangeRow()}setMinMaxRangeDisplayedRow(t){for(;this.displayedMaxRangeRow>t&&this.pageNumber>1;)this.pageNumber-=1,this.setDisplayedMinMaxRangeRow();this.displayedMaxRangeRow=t}setDisplayedMinMaxRangeRow(){this.displayedMinRangeRow=this.pageNumber*this.pageSize-this.pageSize+1,this.displayedMaxRangeRow=this.pageNumber*this.pageSize}isTextOnly(){return this.exportTypes.find(t=>t.ID==this.exportType)?.TxtOnly}isExludeJsonType(){return this.exportTypes.find(t=>t.ID==this.exportType)?.ExcludeJsonType}allowTxtOption(){return this.exportTypes.find(t=>t.ID==this.exportType)?.AllowTxtOption}onChangeExportType(t){this.calledApiCount=!1,this.displayedMaxRangeRow=this.pageSize,this.displayedMinRangeRow=this.pageNumber,this.isTextOnly()?this.exportFormat="TXT":this.exportFormat="CSV"}static \u0275fac=function(e){return new(e||o)(_(ae),_(ne),_(E),_(S))};static \u0275cmp=J({type:o,selectors:[["POS-modal-complex-export"]],decls:15,vars:7,consts:[[3,"onCancel","onClose","onOk","config"],[1,"container-fluid"],[1,"row"],[1,"col-3","fw-bold","mt-8",2,"display","flex","align-items","center"],[1,"col-9","mt-8"],[3,"ngModelChange","ngModel"],["value","CSV"],["value","XLSX"],["value","JSON"],[1,"col-3","fw-bold",2,"display","flex","align-items","center"],[1,"col-9"],["appendTo","body","bindLabel","Value","bindValue","ID",3,"ngModelChange","change","items","ngModel"],["ng-option-tmp",""],["matTooltipPosition","right",3,"matTooltip"],[1,"fa-solid","fa-file-csv","me-3","mb-1"],[1,"fa-solid","fa-file-excel","me-3","mb-1"],[3,"value"],[1,"me-3","mb-1"],[1,"fa-solid","fa-brackets-curly","me-3","mb-1"],[1,"col-9","mt-8",2,"display","flex","align-items","center","column-gap","10px"],["type","text","autoNum","","name","pageNumber","id","pageNumber",1,"form-control","text-center",2,"width","50px",3,"ngModelChange","ngModel"],[1,"col-12","mt-8"],[1,"p-3",2,"background-color","#add8e6","border-radius","4px"],[1,"fa-solid","fa-circle-exclamation","mx-3"],[1,"fa-solid","fa-circle-question","mx-3"],[1,"fw-bold"],[1,"fa-solid","fa-circle-question","mx-3",3,"click"]],template:function(e,i){e&1&&(l(0,"modal-material",0),y("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()})("onOk",function(){return i.onOk()}),l(1,"content")(2,"div",1)(3,"div",2),d(4,he,5,2),l(5,"div",3),s(6," Format "),r(),l(7,"div",4)(8,"mat-button-toggle-group",5),A("ngModelChange",function(n){return D(i.exportFormat,n)||(i.exportFormat=n),n}),d(9,_e,3,0,"mat-button-toggle",6),d(10,ye,3,0,"mat-button-toggle",7),X(11,Te,1,1,null,null,j),d(13,Me,3,0,"mat-button-toggle",8),r()(),d(14,Se,11,8),r()()()()),e&2&&(u("config",i.config),p(4),c(i.exportTypes.length>1?4:-1),p(4),R("ngModel",i.exportFormat),p(),c(i.isTextOnly()?-1:9),p(),c(i.isTextOnly()?-1:10),p(),H(i.extraExportTypesOptions),p(2),c(i.data.JSONAPI&&!i.isTextOnly()&&!i.isExludeJsonType()?13:-1),p(),c(i.pagination?14:-1))},dependencies:[de,me,re,Y,q,K,Q,$,pe,ce,oe,te,ie,ee,Z,le,W,U],styles:[".general[_ngcontent-%COMP%], .page[_ngcontent-%COMP%]{border:1px solid #dcdcdc;border-radius:3px;padding:10px 8px;position:relative}.general[_ngcontent-%COMP%]{margin-bottom:15px}.floating-title[_ngcontent-%COMP%]{position:absolute;top:-10.5px;background:#fff;color:gray;font-size:14px}.select-header[_ngcontent-%COMP%]{line-height:36px}.input-header[_ngcontent-%COMP%]{line-height:36.6px}.form-control[_ngcontent-%COMP%]{height:max-content!important;padding:.375rem .75rem!important}"]})};export{S as a,xe as b};
|