dealpos 25.45.0 → 25.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-UARWMJ5H.js → chunk-2JU7KFOZ.js} +1 -1
- package/browser/{chunk-4UJTVSL2.js → chunk-2QD46TNT.js} +1 -1
- package/browser/{chunk-KJROORJO.js → chunk-2SM2HFRR.js} +1 -1
- package/browser/{chunk-D7J7CQGT.js → chunk-2TXCUXTF.js} +1 -1
- package/browser/{chunk-QNJH27F5.js → chunk-33B62QHS.js} +1 -1
- package/browser/{chunk-6IVR565J.js → chunk-36JFFXJO.js} +1 -1
- package/browser/{chunk-7NQ56KZ6.js → chunk-3CZ6HKSM.js} +1 -1
- package/browser/chunk-3IWVFLM3.js +1 -0
- package/browser/{chunk-KHFL6T5N.js → chunk-3LPZYQS6.js} +1 -1
- package/browser/{chunk-B7QNQTF3.js → chunk-3MU2GNGM.js} +1 -1
- package/browser/{chunk-M6UB4WVK.js → chunk-43CXFI4D.js} +1 -1
- package/browser/{chunk-ODEK2WQO.js → chunk-4AUOGTXI.js} +5 -5
- package/browser/{chunk-2YGMAT2F.js → chunk-4CFMB4IK.js} +1 -1
- package/browser/{chunk-TKJUJYEI.js → chunk-4JCHCMUR.js} +1 -1
- package/browser/{chunk-WGWBCLKM.js → chunk-4JVPFRFP.js} +1 -1
- package/browser/{chunk-G2QZRGKV.js → chunk-4KMN7PSV.js} +1 -1
- package/browser/{chunk-TEH7D4QV.js → chunk-4NLZJJA4.js} +1 -1
- package/browser/{chunk-AF5V3BUB.js → chunk-4ZFVM7K7.js} +1 -1
- package/browser/{chunk-XF27FA5V.js → chunk-55FE5P6P.js} +1 -1
- package/browser/{chunk-LQDIK5ZH.js → chunk-5DXDXIDO.js} +1 -1
- package/browser/{chunk-4KOOWCML.js → chunk-5VUKKQUZ.js} +2 -2
- package/browser/{chunk-Q32BQBU5.js → chunk-67UQKMLX.js} +1 -1
- package/browser/{chunk-R4K5X4RE.js → chunk-6ASBLKNZ.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-ZDX5LF2K.js → chunk-6MU3ID6Q.js} +1 -1
- package/browser/{chunk-M67ULXNR.js → chunk-7IRMDCKA.js} +1 -1
- package/browser/{chunk-PHWHZQFM.js → chunk-7O6Z7YZS.js} +1 -1
- package/browser/{chunk-CFSYN7MV.js → chunk-7TEDBCUJ.js} +1 -1
- package/browser/{chunk-NE57UXZU.js → chunk-A4SCCZAY.js} +1 -1
- package/browser/{chunk-JHYJTTAR.js → chunk-AASKAWJ4.js} +1 -1
- package/browser/{chunk-KHDFH3GS.js → chunk-AMUMNTYT.js} +1 -1
- package/browser/{chunk-7ZTWH3L6.js → chunk-B235RUOX.js} +1 -1
- package/browser/{chunk-66DT3BE2.js → chunk-B3EZEY4B.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-P3BUVJKX.js → chunk-BA466YBV.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-Q5FKQWU2.js → chunk-BZ44CISC.js} +1 -1
- package/browser/{chunk-OYNVXKZ3.js → chunk-BZVCDBQR.js} +1 -1
- package/browser/chunk-CKGJCUHW.js +1 -0
- package/browser/{chunk-VJQA5UAH.js → chunk-CRLFATTL.js} +1 -1
- package/browser/{chunk-IMO77OHS.js → chunk-D5RACD33.js} +1 -1
- package/browser/{chunk-235POOLV.js → chunk-DB3W42KN.js} +1 -1
- package/browser/{chunk-SWQE65GY.js → chunk-DC5TNUBW.js} +1 -1
- package/browser/{chunk-YNRHLKM5.js → chunk-DELGLVJJ.js} +1 -1
- package/browser/{chunk-PZVPROT6.js → chunk-DV6Z7FPV.js} +1 -1
- package/browser/{chunk-ZRAK4HYU.js → chunk-E2XUBZDW.js} +1 -1
- package/browser/{chunk-FW2LVBF2.js → chunk-E424AX7J.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-EBHLJ7D3.js +18 -0
- 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-MIW5EYCH.js → chunk-FDH4S2DG.js} +1 -1
- package/browser/{chunk-HPXDTBZD.js → chunk-FFOK3ZNC.js} +1 -1
- package/browser/{chunk-OLC5OIWO.js → chunk-FPO73IWN.js} +1 -1
- package/browser/{chunk-ORP2SVPR.js → chunk-FQTHN2D5.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-Y5GN5XOG.js → chunk-FV3VHB7N.js} +1 -1
- package/browser/{chunk-RUE7RBU6.js → chunk-G4D3XN53.js} +1 -1
- package/browser/{chunk-WVCZAPRZ.js → chunk-G7HGWSUU.js} +1 -1
- package/browser/{chunk-MLFDP74G.js → chunk-GDPQI6PI.js} +1 -1
- package/browser/{chunk-HNU2JIBP.js → chunk-GJIFUWGQ.js} +1 -1
- package/browser/{chunk-DDM5K7MP.js → chunk-GWL7ZN37.js} +1 -1
- package/browser/{chunk-2SJZWKFD.js → chunk-GYYMO4YR.js} +1 -1
- package/browser/{chunk-5XDBC6O7.js → chunk-H3RJALHH.js} +1 -1
- package/browser/{chunk-LC5JP6E6.js → chunk-HDJJJAZJ.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-CQPKVO7W.js → chunk-HQWW3C2M.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-AOQIZ6M2.js → chunk-I26CNUBY.js} +1 -1
- package/browser/{chunk-MCPXNQRW.js → chunk-I4WJ5CEN.js} +1 -1
- package/browser/chunk-IBZF5QXJ.js +1 -0
- package/browser/{chunk-KLKZQABE.js → chunk-ICDZ6ZG2.js} +1 -1
- package/browser/{chunk-3XRT75ZN.js → chunk-IFARYZIK.js} +1 -1
- package/browser/{chunk-BFHHIWRM.js → chunk-IGHHLZWC.js} +1 -1
- package/browser/{chunk-5574BNHI.js → chunk-IKJNYXIS.js} +1 -1
- package/browser/{chunk-MVCDG4KS.js → chunk-IMM7CUI7.js} +5 -5
- package/browser/{chunk-J55W7XV7.js → chunk-IR75FMI5.js} +1 -1
- package/browser/{chunk-PY3PDRRW.js → chunk-ISY4SDFY.js} +1 -1
- package/browser/{chunk-JL56QKED.js → chunk-IVBM4Y3J.js} +1 -1
- package/browser/{chunk-QBNQANTG.js → chunk-IVR7R22T.js} +1 -1
- package/browser/{chunk-YBLSVIMZ.js → chunk-IZQ5FNXP.js} +1 -1
- package/browser/{chunk-62E2JEWQ.js → chunk-J5FCCS76.js} +1 -1
- package/browser/{chunk-RINV4BX7.js → chunk-JGYO4OTZ.js} +1 -1
- package/browser/{chunk-IRPQWJZH.js → chunk-JKBJ3O3G.js} +2 -2
- package/browser/{chunk-IH5OCDKI.js → chunk-JRM47ALM.js} +1 -1
- package/browser/{chunk-QOTJ7B7C.js → chunk-JRP5O56W.js} +1 -1
- package/browser/{chunk-KHDUUG2S.js → chunk-JTRNQBXF.js} +1 -1
- package/browser/{chunk-IEYBKFX7.js → chunk-JTTRYU4G.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-OVSWMLB3.js → chunk-KFDGG6IE.js} +1 -1
- package/browser/{chunk-3XJHHRJT.js → chunk-KFUPP33B.js} +1 -1
- package/browser/{chunk-XOOFBNDP.js → chunk-KLZBTT2P.js} +1 -1
- package/browser/{chunk-SUP23S2E.js → chunk-KMIXT3V6.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-2MGVRRAP.js → chunk-KQXOXN6S.js} +13 -13
- package/browser/{chunk-4ZMJFXGW.js → chunk-KWDQGODG.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-Z4NZP4NH.js → chunk-LKKENA2L.js} +1 -1
- package/browser/{chunk-XYHPCRIZ.js → chunk-LODGW3WU.js} +1 -1
- package/browser/{chunk-TKZU227J.js → chunk-LP2YX47Z.js} +1 -1
- package/browser/{chunk-ZHTSXEVO.js → chunk-M6SFCHJQ.js} +1 -1
- package/browser/{chunk-ZWPJWDYN.js → chunk-MFHN36L5.js} +1 -1
- package/browser/{chunk-CUY227OT.js → chunk-MNZLKEWQ.js} +1 -1
- package/browser/{chunk-2CWEU47S.js → chunk-MOLMIGZ2.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-EE3OKRUQ.js → chunk-NCT5IK4R.js} +1 -1
- package/browser/{chunk-6M6QFFLT.js → chunk-NGRJ35NF.js} +1 -1
- package/browser/{chunk-RCMYO542.js → chunk-NJB3X4XL.js} +1 -1
- package/browser/{chunk-S6FVFOZM.js → chunk-NNONJUQ3.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-TQZVYC7J.js → chunk-OMKIT3Z4.js} +1 -1
- package/browser/{chunk-LBWSX76J.js → chunk-OND3CFSL.js} +1 -1
- package/browser/{chunk-EIBM6U5N.js → chunk-OTIPYKW7.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-CKN6D7N7.js → chunk-OZGLZGND.js} +1 -1
- package/browser/{chunk-JQOVAMQC.js → chunk-P2CKEL54.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-M6PA26FM.js → chunk-PIYVELLT.js} +1 -1
- package/browser/{chunk-WT6PMWGG.js → chunk-PLVOH67J.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-K2U4QSXW.js → chunk-PUXE7FLT.js} +1 -1
- package/browser/{chunk-7YKHGYIG.js → chunk-PXKNGMLL.js} +1 -1
- package/browser/{chunk-J4J3XVRF.js → chunk-PXOXHTNI.js} +1 -1
- package/browser/chunk-PYATA4SM.js +1 -0
- 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-E5HC3WFJ.js → chunk-QUAMZZS6.js} +1 -1
- package/browser/{chunk-A3FTQA6E.js → chunk-RCC5SUNH.js} +1 -1
- package/browser/{chunk-Q2GPSDAM.js → chunk-RFVQHGYD.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-WOMVTVEQ.js → chunk-RVKNSR2K.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-YX5ADQPF.js → chunk-SH3T5X7H.js} +1 -1
- package/browser/chunk-SXPVIX36.js +1 -0
- package/browser/{chunk-PT3R3NCF.js → chunk-SYMXIBEB.js} +1 -1
- package/browser/{chunk-CRU6KO53.js → chunk-THGBNMLF.js} +1 -1
- package/browser/{chunk-GIW2PDIG.js → chunk-TIGG24TH.js} +1 -1
- package/browser/{chunk-IWPVMLPY.js → chunk-TMQ7NWGZ.js} +1 -1
- package/browser/{chunk-UZMFXHQD.js → chunk-TNZMSOM3.js} +1 -1
- 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-ZOPOSPVC.js → chunk-TX6ZFPHY.js} +1 -1
- package/browser/{chunk-CTPHJSLU.js → chunk-TYUL4J6N.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-MJV24UTS.js → chunk-UH2PJXPG.js} +2 -2
- package/browser/chunk-UP2UDOTJ.js +1 -0
- package/browser/{chunk-EI2XG4ML.js → chunk-UPC37DMP.js} +1 -1
- package/browser/{chunk-HNLSUZUH.js → chunk-V6MKE6LP.js} +1 -1
- package/browser/{chunk-44LXIDEF.js → chunk-V75YVSP3.js} +1 -1
- package/browser/{chunk-CJFDTLOQ.js → chunk-V7HBROQ5.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-VPBOQNZA.js +131 -0
- package/browser/{chunk-HD6ETXDZ.js → chunk-VQBUIUJC.js} +1 -1
- package/browser/chunk-VS3RTXZC.js +5 -0
- package/browser/{chunk-2557JAG4.js → chunk-VVB7545X.js} +1 -1
- package/browser/{chunk-L6YGMZJK.js → chunk-W6PT2SCS.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-WQNTJH2X.js +1 -0
- package/browser/{chunk-CRMTCX6F.js → chunk-X6MBRJTG.js} +2 -2
- package/browser/{chunk-2ILW7WWJ.js → chunk-XIXREDEB.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-5RLB3NV4.js → chunk-Y6JQWF34.js} +1 -1
- package/browser/{chunk-RHVNZ2DF.js → chunk-YL6HCV6T.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-YTOGQOIP.js +1 -0
- package/browser/{chunk-SII6VICE.js → chunk-YXNBLVK4.js} +1 -1
- package/browser/{chunk-5VGCSK5N.js → chunk-YY3636UT.js} +1 -1
- package/browser/{chunk-EXIKKRCD.js → chunk-YZP4FX7D.js} +1 -1
- package/browser/{chunk-NCXT27M5.js → chunk-ZGSYDQBM.js} +1 -1
- package/browser/chunk-ZRHYTE5S.js +1 -0
- package/browser/index.html +2 -2
- package/browser/{main-H2XKB5YR.js → main-WVCGTGWV.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-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{u as T,v as M}from"./chunk-
|
|
1
|
+
import{u as T,v as M}from"./chunk-EGUIWOC3.js";import{e as g,f as u}from"./chunk-QGYIPOLS.js";import{a as C}from"./chunk-2FWFPV5I.js";import{Bb as t,Cb as l,Db as c,Eb as f,Nb as d,Qa as m,Wa as s,cb as i,gb as p}from"./chunk-VS3RTXZC.js";var _=class a{constructor(e,o){this.data=e;this.dialogRef=o;this.message=e.message,this.modalConfig=new T,this.modalConfig.title=e.title,this.modalConfig.okText=e.okText?e.okText:"Yes",this.modalConfig.cancelText=e.cancelText?e.cancelText:"No",this.modalConfig.headerType=e.headerType?e.headerType:C.Success}modalConfig;message;headerType;onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}static \u0275fac=function(o){return new(o||a)(i(u),i(g))};static \u0275cmp=p({type:a,selectors:[["app-modal-confirm"]],standalone:!1,decls:3,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fs-4","mb-0",3,"innerHTML"]],template:function(o,n){o&1&&(l(0,"modal-material",0),d("onOk",function(){return n.onOk()})("onCancel",function(){return n.onClose()})("onClose",function(){return n.onClose()}),l(1,"content"),f(2,"div",1),c()()),o&2&&(t("config",n.modalConfig),s(2),t("innerHTML",n.message,m))},dependencies:[M],encapsulation:2})};export{_ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{be as u,d as f,la as d,oa as b}from"./chunk-VS3RTXZC.js";var v=class p{constructor(e){this.toastr=e}subject$=new f;onFileLoad(e){let s=e.target.result,o=!1,i=[],n=[],l=0;for(let a of s.split(/[\r\n]+/))if(o){let r={};for(let c=0;c<l;c++)r[n[c]]=a.split(",")[c];i.push(r)}else{for(let r=0;r<a.split(",").length;r++)l=a.split(",").length,n.push(a.split(",")[r].replace(/ /g,""));o=!0}return i.splice(-1),i}convert(e){let t=e.files,s=["csv"];if(t&&t.length){let o=e.files[0].name.split(".").pop().toLowerCase();if(s.indexOf(o)>-1){let n=t[0],l=new FileReader;return l.onload=a=>{let r=this.onFileLoad(a);this.subject$.next(r)},l.readAsText(n,"UTF-8"),this.subject$.asObservable()}else this.toastr.error("Invalid File Type","Failed")}}convertFile(e){let t=e,s=new FileReader;return s.onload=o=>{let i=this.onFileLoad(o);this.subject$.next(i)},s.readAsText(t,"UTF-8"),this.subject$.asObservable()}static \u0275fac=function(t){return new(t||p)(b(u))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})};export{v as a};
|
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ge}from"./chunk-NJOOFJNE.js";import{a as Fe,f as Ae}from"./chunk-TKJUJYEI.js";import{b as Le,c as Re,d as Be,e as We,f as je,g as ze}from"./chunk-JJ55MEGU.js";import"./chunk-JR6SBNDP.js";import{b as $e}from"./chunk-HEGIEXS3.js";import"./chunk-HPWVZRZF.js";import"./chunk-32GJXDHR.js";import{e as Ne}from"./chunk-5NRBDWB4.js";import"./chunk-AF5V3BUB.js";import"./chunk-5RLB3NV4.js";import"./chunk-LPD3H6QQ.js";import"./chunk-2EEKMQEX.js";import"./chunk-3XJHHRJT.js";import{b as xe}from"./chunk-M67ULXNR.js";import"./chunk-3RK6DDJD.js";import{a as he}from"./chunk-D75PDB6P.js";import"./chunk-5J2SNOT2.js";import{d as Se}from"./chunk-PY3PDRRW.js";import"./chunk-NEJRKLYO.js";import{b as De,c as ke,e as Ue,f as Ve}from"./chunk-6IVR565J.js";import"./chunk-GIW2PDIG.js";import"./chunk-CNCKIVTQ.js";import"./chunk-WVCZAPRZ.js";import"./chunk-4UJTVSL2.js";import"./chunk-ZJ4AGOKX.js";import"./chunk-WPTBNQ2V.js";import"./chunk-CANN2XN6.js";import{c as Pe,d as Oe}from"./chunk-YX5ADQPF.js";import{a as be,b as Ee}from"./chunk-62E2JEWQ.js";import"./chunk-KHFL6T5N.js";import"./chunk-AFCABMLQ.js";import{u as ye,v as Me,w as Te}from"./chunk-YFMVQJRL.js";import"./chunk-HD6ETXDZ.js";import{O as q}from"./chunk-2525CDKJ.js";import{e as ve,f as we,g as Ie}from"./chunk-TY7JJASH.js";import"./chunk-K2M625FR.js";import"./chunk-ZOPOSPVC.js";import"./chunk-EXIKKRCD.js";import"./chunk-2FWFPV5I.js";import{la as Ce}from"./chunk-4DH3BDE3.js";import{F as R,G as fe,h as ue,o as _e}from"./chunk-PRROMENK.js";import"./chunk-L6YGMZJK.js";import"./chunk-P3BUVJKX.js";import"./chunk-ODGFQ7QJ.js";import"./chunk-CTPHJSLU.js";import{Ab as c,Ac as g,Bb as n,Bc as C,Ca as k,Cb as o,Cc as me,Db as b,E as Y,Hb as T,I as J,Ib as E,Kb as S,Mb as f,Nc as H,Ob as s,Oc as A,Pb as oe,Qb as Q,Ra as Z,Sb as U,Tb as V,Ub as N,Wa as a,Y as z,Yb as F,_b as re,aa as X,bb as G,bc as l,bd as se,cc as d,dc as v,de as ge,fa as $,fb as I,gc as P,hc as O,ic as D,jb as ee,jd as de,k as K,lb as y,nd as ce,pa as M,qd as L,rc as le,sc as pe,ta as u,tb as h,ua as _,uc as ae,vb as x,wb as te,yb as ie,zb as ne}from"./chunk-LBIXL2NM.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ye=["stepperRef"],Je=[[["preview"]],[["complete"]]],Xe=["preview","complete"];function Ze(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function nt(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function ot(t,r){if(t&1&&h(0,nt,9,3,"div",9),t&2){s();let e=F(1);x(e.selectedIndex===0?0:-1)}}function rt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function mt(t,r){t&1&&Q(0)}function st(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function _t(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Ye,5),e&2){let i;V(i=N())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Xe,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Je),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,Ze,1,1,"ng-template",3)(4,et,1,1,"ng-template",4)(5,tt,1,1,"ng-template",5)(6,it,3,0,"ng-template",6)(7,ot,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,rt,1,1,"ng-template",3)(10,lt,1,1,"ng-template",4)(11,pt,1,1,"ng-template",5)(12,at,3,0,"ng-template",6)(13,mt,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,st,1,1,"ng-template",3)(16,dt,1,1,"ng-template",4)(17,ct,1,1,"ng-template",5)(18,ut,3,0,"ng-template",6)(19,_t,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[Se,R,fe,he,xe,$e,Ne,ze,We,Le,je,Re,Be],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new ye;dialogRef=M(ve);data=M(we);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Te,Me,ce],encapsulation:2})};var gt=["importStepper"],Ct=()=>({"min-width":"50rem"}),St=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),ht=t=>({"mb-1":t});function xt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function bt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,St,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function vt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function wt(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=F(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function It(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,ht,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function yt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,It,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Mt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Tt(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Mt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var qe=class t extends be{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleUrl="https://cdn.dealpos.xyz/web-import-template/Outlet_Import_Template.csv";articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(Ie);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Ee),G(ge))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(gt,5),p&2){let m;V(m=N())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,xt,2,0,"button",4),h(3,bt,4,10,"button",5),h(4,vt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,wt,33,5,"ng-template",10)(13,yt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Tt,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,Ct)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Ve,Ue,Ae,Fe,Ce,Oe,Pe,R,ue,_e,ke,De,de,Ge],encapsulation:2})};export{qe as OutletImportComponent};
|
|
1
|
+
import{a as Ge}from"./chunk-PCAFUCUK.js";import{a as Fe,f as Ae}from"./chunk-4JCHCMUR.js";import{b as Le,c as Re,d as Be,e as We,f as je,g as ze}from"./chunk-PQ65IMRY.js";import"./chunk-RPJIPLQS.js";import{b as $e}from"./chunk-SGSOCLV7.js";import"./chunk-RMIJZMA5.js";import"./chunk-BLQKJ5OK.js";import{e as Ne}from"./chunk-FADT3LJL.js";import"./chunk-4ZFVM7K7.js";import"./chunk-Y6JQWF34.js";import"./chunk-YMVBGQ2W.js";import"./chunk-OGN6JWED.js";import"./chunk-KFUPP33B.js";import{b as xe}from"./chunk-7IRMDCKA.js";import"./chunk-3RK6DDJD.js";import{a as he}from"./chunk-CKGJCUHW.js";import"./chunk-BJG2UU2M.js";import{d as Se}from"./chunk-ISY4SDFY.js";import"./chunk-RNEU5YBN.js";import{b as De,c as ke,e as Ue,f as Ve}from"./chunk-36JFFXJO.js";import"./chunk-TIGG24TH.js";import"./chunk-LJMHI6I5.js";import"./chunk-G7HGWSUU.js";import"./chunk-2QD46TNT.js";import"./chunk-YQ5GJPDB.js";import"./chunk-KMYTSO3Q.js";import"./chunk-BRHHRJLT.js";import{c as Pe,d as Oe}from"./chunk-SH3T5X7H.js";import{a as be,b as Ee}from"./chunk-J5FCCS76.js";import"./chunk-3LPZYQS6.js";import"./chunk-BJKHMXAA.js";import{u as ye,v as Me,w as Te}from"./chunk-EGUIWOC3.js";import"./chunk-VQBUIUJC.js";import{O as q}from"./chunk-HYXSN2J6.js";import{e as ve,f as we,g as Ie}from"./chunk-QGYIPOLS.js";import"./chunk-WACBOZDR.js";import"./chunk-TX6ZFPHY.js";import"./chunk-YZP4FX7D.js";import"./chunk-2FWFPV5I.js";import{la as Ce}from"./chunk-WAXYETAG.js";import{F as R,G as fe,h as ue,o as _e}from"./chunk-OJ5SEYSF.js";import"./chunk-W6PT2SCS.js";import"./chunk-BA466YBV.js";import"./chunk-TS6CZC3J.js";import"./chunk-TYUL4J6N.js";import{$b as re,Ab as ne,Bb as c,Bc as g,Ca as k,Cb as n,Cc as C,Db as o,Dc as me,E as Y,Eb as b,I as J,Ib as T,Jb as E,Lb as S,Nb as f,Oc as H,Pb as s,Pc as A,Qb as oe,Ra as Z,Rb as Q,Tb as U,Ub as V,Vb as N,Wa as a,Y as z,Zb as F,aa as X,cb as G,cc as l,cd as se,dc as d,ec as v,ee as ge,fa as $,gb as I,hc as P,ic as O,jc as D,k as K,kb as ee,kd as de,mb as y,od as ce,pa as M,rd as L,sc as le,ta as u,tc as pe,ua as _,ub as h,vc as ae,wb as x,xb as te,zb as ie}from"./chunk-VS3RTXZC.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ye=["stepperRef"],Je=[[["preview"]],[["complete"]]],Xe=["preview","complete"];function Ze(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function nt(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function ot(t,r){if(t&1&&h(0,nt,9,3,"div",9),t&2){s();let e=F(1);x(e.selectedIndex===0?0:-1)}}function rt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function mt(t,r){t&1&&Q(0)}function st(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function _t(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Ye,5),e&2){let i;V(i=N())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Xe,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Je),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,Ze,1,1,"ng-template",3)(4,et,1,1,"ng-template",4)(5,tt,1,1,"ng-template",5)(6,it,3,0,"ng-template",6)(7,ot,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,rt,1,1,"ng-template",3)(10,lt,1,1,"ng-template",4)(11,pt,1,1,"ng-template",5)(12,at,3,0,"ng-template",6)(13,mt,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,st,1,1,"ng-template",3)(16,dt,1,1,"ng-template",4)(17,ct,1,1,"ng-template",5)(18,ut,3,0,"ng-template",6)(19,_t,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[Se,R,fe,he,xe,$e,Ne,ze,We,Le,je,Re,Be],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new ye;dialogRef=M(ve);data=M(we);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Te,Me,ce],encapsulation:2})};var gt=["importStepper"],Ct=()=>({"min-width":"50rem"}),St=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),ht=t=>({"mb-1":t});function xt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function bt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,St,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function vt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function wt(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=F(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function It(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,ht,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function yt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,It,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Mt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Tt(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Mt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var qe=class t extends be{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleUrl="https://cdn.dealpos.xyz/web-import-template/Outlet_Import_Template.csv";articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(Ie);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Ee),G(ge))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(gt,5),p&2){let m;V(m=N())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,xt,2,0,"button",4),h(3,bt,4,10,"button",5),h(4,vt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,wt,33,5,"ng-template",10)(13,yt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Tt,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,Ct)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Ve,Ue,Ae,Fe,Ce,Oe,Pe,R,ue,_e,ke,De,de,Ge],encapsulation:2})};export{qe as OutletImportComponent};
|
|
@@ -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{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 +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{c as f}from"./chunk-
|
|
1
|
+
import{c as f}from"./chunk-W6PT2SCS.js";import{a as m}from"./chunk-TYUL4J6N.js";import{Bd as l,I as c,be as v,ee as u,k as n,la as s,oa as e,yd as h}from"./chunk-VS3RTXZC.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-GYYMO4YR.js";import{C as N,F as L,G as j,c as E,h as A,i as V,k as I,o as R,p as U}from"./chunk-OJ5SEYSF.js";import{c as D}from"./chunk-W6PT2SCS.js";import"./chunk-BA466YBV.js";import{a as p}from"./chunk-TS6CZC3J.js";import"./chunk-TYUL4J6N.js";import{Cb as i,Db as n,Eb as u,Lb as C,Nb as g,Tb as S,Ub as _,Vb as x,Wa as b,Yd as M,be as P,cb as d,cc as s,d as f,da as v,gb as y,hc as w,ic as O,jc as T,ta as l,ua as m}from"./chunk-VS3RTXZC.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var z=["totpCode"],F=class h{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){p.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),p.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return p.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return p.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||h)(d(k),d(M),d(D),d(P))};static \u0275cmp=y({type:h,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&S(z,5),t&2){let r;_(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","//res.cloudinary.com/pos/image/upload/v1666079494/POS/Images/Login/TOTP.png",1,"border-0",2,"width","50%"],[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"]],template:function(t,o){if(t&1){let r=C();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),g("submit",function(){return l(r),m(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),m(a)}),g("keypress",function(a){return l(r),m(o.numberOnly(a))})("ngModelChange",function(a){return l(r),m(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[j,U,E,A,V,N,L,R,I],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:3rem}@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}"]})};export{F as AuthTotpComponent};
|
|
@@ -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 +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 r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-J5FCCS76.js";import{K as a}from"./chunk-VS3RTXZC.js";var s=class extends r{constructor(t,e,o,n){super(t);this.httpService=e;let p=this.getInfoID(n);this.menuData$.pipe(a(()=>this.getBindDataObservable(o,p))).subscribe({next:i=>{this.bindData(i),this.postBindData(i)}})}data;getInfoID(t){return t.snapshot.queryParams.ID}getBindDataObservable(t,e){return this.httpService.post(`/API/${t}`,{ID:e})}bindData(t){this.data=t}postBindData(t){}};export{s as a};
|
|
@@ -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};
|