dealpos 26.36.52 → 26.36.53
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/assets/workers/generic-fetch.worker.js +96 -0
- package/browser/{chunk-WBWM7DGA.js → chunk-223QRLKE.js} +1 -1
- package/browser/{chunk-K2JHGNIO.js → chunk-22V5MXFU.js} +1 -1
- package/browser/{chunk-ETIOGFW7.js → chunk-2VCUYSQO.js} +1 -1
- package/browser/{chunk-REUSKXEW.js → chunk-33GK3CVK.js} +1 -1
- package/browser/{chunk-YFFT6JHN.js → chunk-3I4NR7TX.js} +1 -1
- package/browser/{chunk-HGDYRQBL.js → chunk-3RPHGJ4F.js} +1 -1
- package/browser/{chunk-4AFTT2XP.js → chunk-3TOYBLX5.js} +1 -1
- package/browser/{chunk-KTDZ34WD.js → chunk-4LVKZUPB.js} +1 -1
- package/browser/{chunk-RMG6TZOB.js → chunk-4XMJO552.js} +1 -1
- package/browser/{chunk-5KGTYF4O.js → chunk-52WLQLJK.js} +1 -1
- package/browser/{chunk-F7O4N6MV.js → chunk-5DQNM67P.js} +1 -1
- package/browser/{chunk-A2I2QMXC.js → chunk-5HYSS5TN.js} +1 -1
- package/browser/{chunk-ZXF6T5NF.js → chunk-5N6UNOMD.js} +1 -1
- package/browser/{chunk-NOS3IZI5.js → chunk-5Z4KB4N5.js} +1 -1
- package/browser/{chunk-36LYJB3O.js → chunk-6FEBWP56.js} +1 -1
- package/browser/{chunk-IGP2V3PT.js → chunk-6MQHDKTC.js} +1 -1
- package/browser/{chunk-IMJJIQ3Z.js → chunk-7RQ2JCO6.js} +1 -1
- package/browser/{chunk-DKQB7CH6.js → chunk-7U2PGOL4.js} +2 -2
- package/browser/{chunk-WONZUADS.js → chunk-7WZHTQN4.js} +1 -1
- package/browser/{chunk-N62VQ7EV.js → chunk-7YFMVW74.js} +1 -1
- package/browser/{chunk-BSUDKC6Z.js → chunk-7ZCKCYJO.js} +1 -1
- package/browser/{chunk-63NMSZ2G.js → chunk-AE5SWCVR.js} +1 -1
- package/browser/{chunk-4L6DG4QR.js → chunk-AEUAQVVY.js} +2 -2
- package/browser/{chunk-YWKCX4JS.js → chunk-AKE5WABY.js} +1 -1
- package/browser/{chunk-3LU2XNRO.js → chunk-AN6W7B7P.js} +1 -1
- package/browser/{chunk-ASB337I7.js → chunk-B2OYVK63.js} +1 -1
- package/browser/{chunk-JFUQM6TB.js → chunk-BQTS4N2C.js} +1 -1
- package/browser/{chunk-PYDWVDFF.js → chunk-CDK3AX4Z.js} +1 -1
- package/browser/{chunk-EGFEAPDF.js → chunk-CMMUJI5H.js} +1 -1
- package/browser/{chunk-LPRIHE3T.js → chunk-CQWFXWV5.js} +1 -1
- package/browser/{chunk-DKQCBH4O.js → chunk-CSPMQB2N.js} +1 -1
- package/browser/{chunk-JCKRLI5N.js → chunk-D34PQGTV.js} +1 -1
- package/browser/{chunk-T5X5UR6Z.js → chunk-DHGYMJM5.js} +1 -1
- package/browser/{chunk-2GXU77LM.js → chunk-DN5O5MXB.js} +1 -1
- package/browser/{chunk-ZXEWERRD.js → chunk-DR7VWXFU.js} +1 -1
- package/browser/{chunk-ITCMJ77W.js → chunk-EPUOZ5L3.js} +1 -1
- package/browser/{chunk-RTFMOBMR.js → chunk-F77BOG5V.js} +1 -1
- package/browser/{chunk-OVCA6Q3J.js → chunk-FO4RDMX4.js} +1 -1
- package/browser/{chunk-NHGGV3GO.js → chunk-GFXPE7VF.js} +1 -1
- package/browser/{chunk-Q4FP743N.js → chunk-GSP7O6EX.js} +1 -1
- package/browser/{chunk-IWXBFNID.js → chunk-HDGXBAHJ.js} +1 -1
- package/browser/{chunk-FR4WXN77.js → chunk-HLV7GP4J.js} +1 -1
- package/browser/{chunk-JFEDSR34.js → chunk-HUL6D6HZ.js} +1 -1
- package/browser/{chunk-D3KPSWID.js → chunk-IVYA7T5F.js} +2 -2
- package/browser/{chunk-5TDJHSVB.js → chunk-J2N5NJBE.js} +1 -1
- package/browser/{chunk-IYVMMQUJ.js → chunk-J465KXQF.js} +1 -1
- package/browser/{chunk-2YXUV5KV.js → chunk-J7NMZ3RG.js} +1 -1
- package/browser/{chunk-6MGEFDTC.js → chunk-J7S45M6G.js} +1 -1
- package/browser/{chunk-N5MBXGEO.js → chunk-JDRRCJZG.js} +1 -1
- package/browser/{chunk-OKMNTSZP.js → chunk-JKDJVXVX.js} +1 -1
- package/browser/{chunk-7T4NE6F6.js → chunk-JUHSDEYE.js} +1 -1
- package/browser/{chunk-5GOEYGAT.js → chunk-KDOTD2FS.js} +1 -1
- package/browser/{chunk-XV4SDTMU.js → chunk-KJ74KBOK.js} +1 -1
- package/browser/{chunk-BDBQFWDF.js → chunk-KQKKNICY.js} +1 -1
- package/browser/{chunk-ZNDTSGLE.js → chunk-KQYMJPDH.js} +1 -1
- package/browser/{chunk-DQ2D2JSF.js → chunk-KRIZ6ELK.js} +1 -1
- package/browser/{chunk-BJI574LN.js → chunk-LDDYVKAI.js} +1 -1
- package/browser/{chunk-DLZ2DEYH.js → chunk-LGE4VGV7.js} +2 -2
- package/browser/{chunk-BFUB7PUK.js → chunk-LNCG7VCR.js} +1 -1
- package/browser/{chunk-OLGXL6KY.js → chunk-LVG32JOS.js} +1 -1
- package/browser/{chunk-RQRV2JMH.js → chunk-MBO63NAV.js} +1 -1
- package/browser/{chunk-IRJSWZQR.js → chunk-MEU43YJL.js} +1 -1
- package/browser/{chunk-CWSCHBIZ.js → chunk-MHNOPUYM.js} +1 -1
- package/browser/{chunk-QHETYXUX.js → chunk-MINZY3EE.js} +1 -1
- package/browser/{chunk-KTF3ZITG.js → chunk-MNNHJRKM.js} +1 -1
- package/browser/chunk-MOEGMXF2.js +1 -0
- package/browser/{chunk-IXOA6XG3.js → chunk-MWBPT7MO.js} +1 -1
- package/browser/{chunk-63MASJFY.js → chunk-MYIJLBWV.js} +1 -1
- package/browser/{chunk-5OOVEEBG.js → chunk-NCR2IAVH.js} +1 -1
- package/browser/{chunk-OMFRUXZ4.js → chunk-NIXFPBZZ.js} +1 -1
- package/browser/{chunk-PEZRM57H.js → chunk-O6WJHH2P.js} +1 -1
- package/browser/{chunk-UYQMC5K6.js → chunk-OEKICIXF.js} +1 -1
- package/browser/{chunk-CIUW6RTX.js → chunk-PP7JRJSC.js} +1 -1
- package/browser/{chunk-MHZTVDDB.js → chunk-PQ54NIFO.js} +1 -1
- package/browser/{chunk-RFBGGQCB.js → chunk-PVOJPTLC.js} +1 -1
- package/browser/{chunk-BKMUM2RM.js → chunk-PZF3LDGE.js} +1 -1
- package/browser/{chunk-5ZUVR44C.js → chunk-Q3TKRDQA.js} +1 -1
- package/browser/{chunk-UHJSDSJ5.js → chunk-QEDQNUWC.js} +1 -1
- package/browser/{chunk-OX5TZLJ5.js → chunk-QESQWLD6.js} +1 -1
- package/browser/{chunk-AQ53SE6R.js → chunk-QSWL7LG4.js} +1 -1
- package/browser/{chunk-N5LY6B5L.js → chunk-RC3MRZTW.js} +2 -2
- package/browser/{chunk-WZOIFFNT.js → chunk-RPRVU5QQ.js} +1 -1
- package/browser/{chunk-XWTLUM2Y.js → chunk-RQV3OLAD.js} +1 -1
- package/browser/{chunk-66RIXXLV.js → chunk-RY42IRCX.js} +2 -2
- package/browser/{chunk-MH7BMICS.js → chunk-S3AQRDES.js} +1 -1
- package/browser/{chunk-IMSMZYLG.js → chunk-SJQTGNAQ.js} +1 -1
- package/browser/{chunk-DR2VSZQD.js → chunk-SW36MTKZ.js} +1 -1
- package/browser/{chunk-E7F4AY4U.js → chunk-TRTUCVNH.js} +1 -1
- package/browser/{chunk-TNUQTOD3.js → chunk-TVXUMGKH.js} +1 -1
- package/browser/{chunk-2O56RA5P.js → chunk-UBTWUSCG.js} +1 -1
- package/browser/{chunk-HJA44BZ4.js → chunk-UIPPK6QH.js} +1 -1
- package/browser/{chunk-ZMHLPV7H.js → chunk-ULF3Y27P.js} +1 -1
- package/browser/{chunk-OKMN5YQ5.js → chunk-UYDPTV4L.js} +1 -1
- package/browser/{chunk-BD3ED5WZ.js → chunk-V2UV7IHU.js} +1 -1
- package/browser/{chunk-RDQQUDEC.js → chunk-VB65K7EN.js} +1 -1
- package/browser/{chunk-PG62QDNS.js → chunk-VGO576ND.js} +1 -1
- package/browser/{chunk-G3PPLIMD.js → chunk-VJEAQWIJ.js} +1 -1
- package/browser/{chunk-KSTNMZEW.js → chunk-W4ZGQ62A.js} +1 -1
- package/browser/{chunk-H4TJ2KAF.js → chunk-W7CS4RZN.js} +1 -1
- package/browser/{chunk-5SBYL2GI.js → chunk-WL6NC2OF.js} +1 -1
- package/browser/{chunk-AFMU4M36.js → chunk-WTPAOKVB.js} +1 -1
- package/browser/{chunk-R6I7GUOF.js → chunk-XCLPKPIN.js} +1 -1
- package/browser/{chunk-PRQJFYK6.js → chunk-XNKHFSAI.js} +1 -1
- package/browser/{chunk-QENSRIHN.js → chunk-Z3EOVFO3.js} +1 -1
- package/browser/{chunk-EOJKGSOK.js → chunk-ZECM4QI3.js} +1 -1
- package/browser/{chunk-AGAKZFB7.js → chunk-ZFNVKYBH.js} +1 -1
- package/browser/{chunk-J6PPAROT.js → chunk-ZGEFD5JP.js} +2 -2
- package/browser/{chunk-TTR5CBZD.js → chunk-ZMR2BXBG.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-U4YNDGHP.js → main-INOO5LV2.js} +1 -1
- package/browser/ngsw.json +514 -514
- package/package.json +1 -1
- package/browser/chunk-5EUIK56F.js +0 -1
- package/browser/worker-7INE3PTX.js +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic fetch Web Worker.
|
|
3
|
+
*
|
|
4
|
+
* Served as a static asset from the app ORIGIN (not the CDN) so the browser
|
|
5
|
+
* allows constructing it. It is referenced with an origin-absolute path
|
|
6
|
+
* (`/assets/workers/generic-fetch.worker.js`) instead of `import.meta.url`,
|
|
7
|
+
* which would resolve against the CDN chunk when the build uses --deploy-url
|
|
8
|
+
* and trigger a `SecurityError` (cross-origin Worker).
|
|
9
|
+
*
|
|
10
|
+
* Accepts messages with fetch parameters:
|
|
11
|
+
* - url: Endpoint to fetch
|
|
12
|
+
* - method: HTTP method (default 'GET')
|
|
13
|
+
* - headers: Request headers
|
|
14
|
+
* - body: Request body (optional)
|
|
15
|
+
* - responseType: 'json' | 'text' | 'blob' | 'arrayBuffer' (default 'json')
|
|
16
|
+
* - requestId: Unique identifier for request (optional)
|
|
17
|
+
* - startType, completeType, successType, errorType: Custom event type strings (optional)
|
|
18
|
+
*
|
|
19
|
+
* Responds with:
|
|
20
|
+
* - type: Event type
|
|
21
|
+
* - data: Response data
|
|
22
|
+
* - requestId: Echoed identifier
|
|
23
|
+
* - payload: Extra info (e.g. count)
|
|
24
|
+
* - error: Error message (if any)
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Handles fetch requests sent to the worker.
|
|
29
|
+
* Sends progress and result messages back to the main thread.
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} event.data - Fetch parameters
|
|
32
|
+
* @param {string} event.data.url - Endpoint to fetch
|
|
33
|
+
* @param {string} [event.data.method='GET'] - HTTP method
|
|
34
|
+
* @param {Object} [event.data.headers={}] - Request headers
|
|
35
|
+
* @param {any} [event.data.body=null] - Request body
|
|
36
|
+
* @param {string} [event.data.responseType='json'] - Response type
|
|
37
|
+
* @param {string} [event.data.requestId] - Unique request identifier
|
|
38
|
+
* @param {string} [event.data.startType='FETCH_START'] - Start event type
|
|
39
|
+
* @param {string} [event.data.completeType='FETCH_COMPLETE'] - Complete event type
|
|
40
|
+
* @param {string} [event.data.successType='FETCH_SUCCESS'] - Success event type
|
|
41
|
+
* @param {string} [event.data.errorType='FETCH_ERROR'] - Error event type
|
|
42
|
+
*/
|
|
43
|
+
self.addEventListener("message", async (event) => {
|
|
44
|
+
const {
|
|
45
|
+
url,
|
|
46
|
+
method = "GET",
|
|
47
|
+
headers = {},
|
|
48
|
+
body = null,
|
|
49
|
+
responseType = "json",
|
|
50
|
+
requestId = undefined,
|
|
51
|
+
startType = "FETCH_START",
|
|
52
|
+
completeType = "FETCH_COMPLETE",
|
|
53
|
+
successType = "FETCH_SUCCESS",
|
|
54
|
+
errorType = "FETCH_ERROR",
|
|
55
|
+
} = event.data || {};
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
self.postMessage({ type: startType, requestId });
|
|
59
|
+
|
|
60
|
+
const fetchOptions = { method, headers };
|
|
61
|
+
if (body) fetchOptions.body = body;
|
|
62
|
+
|
|
63
|
+
const response = await fetch(url, fetchOptions);
|
|
64
|
+
let data;
|
|
65
|
+
if (responseType === "json") {
|
|
66
|
+
data = await response.json();
|
|
67
|
+
} else if (responseType === "text") {
|
|
68
|
+
data = await response.text();
|
|
69
|
+
} else if (responseType === "blob") {
|
|
70
|
+
data = await response.blob();
|
|
71
|
+
} else {
|
|
72
|
+
data = await response.arrayBuffer();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
self.postMessage({
|
|
76
|
+
type: completeType,
|
|
77
|
+
data,
|
|
78
|
+
requestId,
|
|
79
|
+
payload: Array.isArray(data) ? data.length : undefined,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
self.postMessage({
|
|
83
|
+
type: successType,
|
|
84
|
+
data,
|
|
85
|
+
requestId,
|
|
86
|
+
count: Array.isArray(data) ? data.length : undefined,
|
|
87
|
+
timestamp: Date.now(),
|
|
88
|
+
});
|
|
89
|
+
} catch (error) {
|
|
90
|
+
self.postMessage({
|
|
91
|
+
type: errorType,
|
|
92
|
+
error: (error && error.message) || String(error),
|
|
93
|
+
requestId,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-QEDQNUWC.js";import"./chunk-N6UN5VE7.js";import"./chunk-GSNMJQ66.js";import"./chunk-MBGAESMM.js";import"./chunk-HKSZBGAA.js";import"./chunk-NJMXSMGX.js";import"./chunk-OLQFDT22.js";import"./chunk-EBUYDS2Y.js";import"./chunk-NNQ7YV45.js";import"./chunk-6P2JYVLD.js";import"./chunk-EIELIV2M.js";import"./chunk-PZF3LDGE.js";import"./chunk-MINZY3EE.js";import"./chunk-MEYOCIHN.js";import"./chunk-ZECM4QI3.js";import"./chunk-SVRHZOWH.js";import"./chunk-IHQOHLPL.js";import"./chunk-BFQOLYHL.js";import"./chunk-VGO576ND.js";import"./chunk-Z3EOVFO3.js";import"./chunk-JQBXKYC5.js";import"./chunk-QAEDK7B5.js";import"./chunk-J465KXQF.js";import"./chunk-73C77AIF.js";import"./chunk-BOBU77RE.js";import"./chunk-XSPKXHFT.js";import"./chunk-SWU6BBBD.js";import"./chunk-PPMQE2JW.js";import"./chunk-WCOJ74AX.js";import"./chunk-NCJEZXKF.js";import"./chunk-HDGXBAHJ.js";import"./chunk-QX4FSLL5.js";import"./chunk-YXX2TH5I.js";import"./chunk-M36GLXBG.js";import"./chunk-CVOK5ITC.js";import"./chunk-J27WSAUU.js";import"./chunk-4KUDABAJ.js";import"./chunk-HTWZXTKN.js";import"./chunk-FNEABRAQ.js";import"./chunk-OSHL72QK.js";import"./chunk-3A7EKFZY.js";import"./chunk-POOTZU2L.js";import"./chunk-MMZCS6WY.js";import"./chunk-F2ZXIBKA.js";import"./chunk-6MQHDKTC.js";import"./chunk-MNNHJRKM.js";import"./chunk-FQIRVQPI.js";import"./chunk-36E5M6EH.js";import"./chunk-PPTZHIIZ.js";import"./chunk-F77BOG5V.js";import"./chunk-WE775XUV.js";import"./chunk-T7N5CA5W.js";import"./chunk-NF7PG5F2.js";export{a as WebhookJobLogsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ut}from"./chunk-6OBQBKFY.js";import{a as ct}from"./chunk-OOM5PVY3.js";import{a as mt}from"./chunk-VI3LBGKH.js";import{a as pt}from"./chunk-7Q4AUIVO.js";import"./chunk-JMX6YATG.js";import{a as rt}from"./chunk-6HFBSHJM.js";import"./chunk-QQIQIEGB.js";import{a as dt}from"./chunk-5ZLUGPDD.js";import{p as lt}from"./chunk-MBGAESMM.js";import"./chunk-HKSZBGAA.js";import"./chunk-NJMXSMGX.js";import"./chunk-OLQFDT22.js";import"./chunk-EBUYDS2Y.js";import"./chunk-NNQ7YV45.js";import"./chunk-6P2JYVLD.js";import"./chunk-QZZUM4LW.js";import{a as X}from"./chunk-5CEKVGU3.js";import{d as ot}from"./chunk-ZKYNE6HS.js";import"./chunk-EIELIV2M.js";import{a as J}from"./chunk-YWKCX4JS.js";import{b as at}from"./chunk-5SBYL2GI.js";import"./chunk-2F4L5DVJ.js";import"./chunk-S6ZAQHVT.js";import"./chunk-ZF4NXOMF.js";import"./chunk-QJD34HI5.js";import"./chunk-CAAMTPNT.js";import"./chunk-MKTK2W67.js";import{b as U}from"./chunk-FLWBWEFM.js";import"./chunk-BKMUM2RM.js";import"./chunk-ZLK3WUVC.js";import"./chunk-2GXU77LM.js";import"./chunk-QHETYXUX.js";import"./chunk-MEYOCIHN.js";import"./chunk-VZUG3XWW.js";import{a as $}from"./chunk-AFSEESTO.js";import{g as it,h as nt}from"./chunk-EOJKGSOK.js";import"./chunk-JYQ3MWVH.js";import"./chunk-EBJVGAD5.js";import"./chunk-LCKY37ME.js";import"./chunk-V45IFCCW.js";import"./chunk-JQXAL6J7.js";import"./chunk-FJBCJO4M.js";import"./chunk-FJAZ5KHI.js";import"./chunk-TECII4TC.js";import"./chunk-N7XFZYAR.js";import"./chunk-NHMVI3RX.js";import"./chunk-CER4VIHT.js";import"./chunk-KVRVSMPL.js";import"./chunk-EXCHBF25.js";import"./chunk-SVRHZOWH.js";import"./chunk-IHQOHLPL.js";import"./chunk-BFQOLYHL.js";import"./chunk-K2NOGF3I.js";import"./chunk-PG62QDNS.js";import{a as Y}from"./chunk-QENSRIHN.js";import"./chunk-JQBXKYC5.js";import"./chunk-QAEDK7B5.js";import"./chunk-IYVMMQUJ.js";import"./chunk-73C77AIF.js";import"./chunk-BOBU77RE.js";import"./chunk-XSPKXHFT.js";import{a as z,b as Q}from"./chunk-SWU6BBBD.js";import"./chunk-PPMQE2JW.js";import{N as et,g as tt}from"./chunk-WCOJ74AX.js";import"./chunk-IN35LCD3.js";import"./chunk-IMSMZYLG.js";import"./chunk-OKQYRKDJ.js";import"./chunk-NCJEZXKF.js";import"./chunk-STKAHNNR.js";import"./chunk-IWXBFNID.js";import{c as K}from"./chunk-QX4FSLL5.js";import"./chunk-YXX2TH5I.js";import"./chunk-M36GLXBG.js";import"./chunk-CVOK5ITC.js";import"./chunk-J27WSAUU.js";import"./chunk-4KUDABAJ.js";import"./chunk-HTWZXTKN.js";import"./chunk-L22C7OZ4.js";import"./chunk-SFD3J3OH.js";import"./chunk-N3XC43X2.js";import"./chunk-FNEABRAQ.js";import"./chunk-OSHL72QK.js";import"./chunk-3A7EKFZY.js";import"./chunk-POOTZU2L.js";import"./chunk-MMZCS6WY.js";import{F as H}from"./chunk-F2ZXIBKA.js";import"./chunk-IGP2V3PT.js";import"./chunk-KTF3ZITG.js";import"./chunk-FQIRVQPI.js";import{b as Z}from"./chunk-36E5M6EH.js";import"./chunk-PPTZHIIZ.js";import"./chunk-RTFMOBMR.js";import{q as R}from"./chunk-WE775XUV.js";import{Ac as F,Bb as d,Bc as E,Cb as M,Eb as N,Fb as W,Gb as _,Hb as a,Ib as o,Ic as m,Jb as D,Jc as C,Kc as y,Nd as A,Oc as k,Sb as P,Ud as G,Vb as b,Xa as i,Xb as p,cb as T,gb as B,kc as r,lb as L,lc as q,mb as O,mc as f,pc as g,qc as I,rc as S,ua as x,va as v,vb as V,zb as c,zd as j}from"./chunk-T7N5CA5W.js";import"./chunk-NF7PG5F2.js";var ft=()=>({maxWidth:"none"}),Ct=()=>["/menu/Outlets/Master/Outlets/Info"],_t=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function xt(t,l){if(t&1){let e=P();a(0,"button",11),b("click",function(){x(e);let n=p();return v(n.openExportModal())}),D(1,"i",12),r(2," Export "),o()}}function vt(t,l){if(t&1){let e=P();a(0,"div",13)(1,"div",14)(2,"h6"),r(3,"Outlet Group"),o(),a(4,"POS-outlet-group-tree-select",15),S("selectedOutletGroupIDChange",function(n){x(e);let s=p();return I(s.pageData().Filter.OutletGroupID,n)||(s.pageData().Filter.OutletGroupID=n),v(n)}),o()(),a(5,"div",14)(6,"h6"),r(7,"Category"),o(),a(8,"POS-product-category-select",16),S("selectedCategoryIDChange",function(n){x(e);let s=p();return I(s.pageData().Filter.CategoryID,n)||(s.pageData().Filter.CategoryID=n),v(n)}),o()(),a(9,"div",17)(10,"h6"),r(11,"From Date"),o(),a(12,"div")(13,"datepicker",18),S("dateChange",function(n){x(e);let s=p();return I(s.pageData().Filter.From,n)||(s.pageData().Filter.From=n),v(n)}),o()()(),a(14,"div",17)(15,"h6"),r(16,"To Date"),o(),a(17,"div")(18,"datepicker",19),S("dateChange",function(n){x(e);let s=p();return I(s.pageData().Filter.To,n)||(s.pageData().Filter.To=n),v(n)}),o()()(),a(19,"div",14)(20,"autocompleteV3",20),S("modelNameChange",function(n){x(e);let s=p();return I(s.pageData().Filter.ListProductID,n)||(s.pageData().Filter.ListProductID=n),v(n)}),o()(),a(21,"div",21)(22,"h6",22),r(23,"Inventory Type"),o(),a(24,"radio-options",23),S("modelChange",function(n){x(e);let s=p();return I(s.pageData().Filter.InventoryType,n)||(s.pageData().Filter.InventoryType=n),v(n)}),o()()()}if(t&2){let e=p();i(4),_("showClear",!0),g("selectedOutletGroupID",e.pageData().Filter.OutletGroupID),i(4),g("selectedCategoryID",e.pageData().Filter.CategoryID),_("showClear",!0),i(5),_("isFloatingLabel",!1),g("date",e.pageData().Filter.From),_("hidelClearBtn",!0),i(5),_("isFloatingLabel",!1),g("date",e.pageData().Filter.To),_("hidelClearBtn",!0),i(2),_("autoZIndex",!0)("overlayStyle",F(22,ft)),g("modelName",e.pageData().Filter.ListProductID),_("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),g("model",e.pageData().Filter.InventoryType),_("options",e.pageData().Options.InventoryTypes)}}function Tt(t,l){t&1&&(a(0,"th",8),r(1,"Code"),o())}function gt(t,l){t&1&&(a(0,"th",9)(1,"span",24),r(2," Start "),o()())}function It(t,l){t&1&&(a(0,"th",9)(1,"span",25),r(2," Bought "),o()())}function St(t,l){t&1&&(a(0,"th",9)(1,"span",26),r(2," Sold "),o()())}function Pt(t,l){t&1&&(a(0,"th",9)(1,"span",27),r(2," T.In "),o()())}function ht(t,l){t&1&&(a(0,"th",9)(1,"span",28),r(2," T.Out "),o()())}function bt(t,l){t&1&&(a(0,"th",9)(1,"span",29),r(2," Adj "),o()())}function Ft(t,l){t&1&&(a(0,"th",9)(1,"span",30),r(2," End "),o()())}function Dt(t,l){t&1&&(a(0,"th",9)(1,"span",31),r(2," Now "),o()())}function Et(t,l){t&1&&(a(0,"th",9)(1,"span",32),r(2," % "),o()())}function wt(t,l){if(t&1&&(a(0,"td",34),r(1),o()),t&2){let e=p().$implicit;i(),f(" ",e.ProductCode," ")}}function Bt(t,l){if(t&1&&(a(0,"td",35),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;_("colsFontColor",e.Start),i(),f(" ",C(2,2,e.Start)," ")}}function Lt(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.Bought)," ")}}function Ot(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.Sold)," ")}}function Vt(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.TransferredIn)," ")}}function Mt(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.TransferredOut)," ")}}function Nt(t,l){if(t&1&&(a(0,"td",35),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;_("colsFontColor",e.Adjustment),i(),f(" ",e.Adjustment<0?e.Adjustment*-1:C(2,2,e.Adjustment)," ")}}function Wt(t,l){if(t&1&&(a(0,"td",35),r(1),o()),t&2){let e=p().$implicit;_("colsFontColor",e.End),i(),f(" ",e.End," ")}}function qt(t,l){if(t&1&&(a(0,"td",35),r(1),o()),t&2){let e=p().$implicit;_("colsFontColor",e.Now),i(),f(" ",e.Now," ")}}function kt(t,l){if(t&1&&(a(0,"td",34),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.SellTransferInRate)," ")}}function jt(t,l){if(t&1&&(a(0,"tr")(1,"td")(2,"a",33),r(3),o()(),a(4,"td")(5,"a",33),r(6),o()(),c(7,wt,2,1,"td",34),c(8,Bt,3,4,"td",35),c(9,Lt,3,3,"td",36),c(10,Ot,3,3,"td",37),c(11,Vt,3,3,"td",36),c(12,Mt,3,3,"td",37),c(13,Nt,3,4,"td",35),c(14,Wt,2,2,"td",35),c(15,qt,2,2,"td",35),c(16,kt,3,3,"td",34),o()),t&2){let e=l.$implicit,u=p(2);i(2),_("routerLink",F(16,Ct))("queryParams",E(17,_t,e.OutletID)),i(),f(" ",e.OutletName," "),i(2),_("routerLink",F(19,yt))("queryParams",E(20,_t,e.ProductID)),i(),q(e.ProductName),i(),d(u.column.code.selected?7:-1),i(),d(u.column.start.selected?8:-1),i(),d(u.column.bought.selected?9:-1),i(),d(u.column.sold.selected?10:-1),i(),d(u.column.transferredIn.selected?11:-1),i(),d(u.column.transferredOut.selected?12:-1),i(),d(u.column.adjust.selected?13:-1),i(),d(u.column.end.selected?14:-1),i(),d(u.column.now.selected?15:-1),i(),d(u.column.percent.selected?16:-1)}}function At(t,l){if(t&1&&N(0,jt,17,22,"tr",null,M),t&2){let e=p();W(e.infiniteList)}}function Gt(t,l){t&1&&(a(0,"tr")(1,"td",38),D(2,"app-empty-state"),o()())}function Rt(t,l){if(t&1&&(a(0,"td",35),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"Start"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"Start"))," ")}}function Ht(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"Bought"))," ")}}function Zt(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"Sold"))," ")}}function zt(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"TransferredIn"))," ")}}function Qt(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"TransferredOut"))," ")}}function Jt(t,l){if(t&1&&(a(0,"td",41),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"Adjustment"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"Adjustment"))," ")}}function Kt(t,l){if(t&1&&(a(0,"td",35),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"End"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"End"))," ")}}function Ut(t,l){if(t&1&&(a(0,"td",35),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"Now"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"Now"))," ")}}function Xt(t,l){if(t&1&&(a(0,"tfoot")(1,"tr",39)(2,"th",40),r(3," Total: "),o(),c(4,Rt,6,12,"td",35),c(5,Ht,4,6,"td",36),c(6,Zt,4,6,"td",37),c(7,zt,4,6,"td",36),c(8,Qt,4,6,"td",37),c(9,Jt,6,12,"td",41),c(10,Kt,6,12,"td",35),c(11,Ut,6,12,"td",35),o()()),t&2){let e=p();i(2),V("colspan",e.column.code.selected?3:2),i(2),d(e.column.start.selected?4:-1),i(),d(e.column.bought.selected?5:-1),i(),d(e.column.sold.selected?6:-1),i(),d(e.column.transferredIn.selected?7:-1),i(),d(e.column.transferredOut.selected?8:-1),i(),d(e.column.adjust.selected?9:-1),i(),d(e.column.end.selected?10:-1),i(),d(e.column.now.selected?11:-1)}}function Yt(t,l){if(t&1){let e=P();a(0,"infinite-pagination",42),b("nextPage",function(){x(e);let n=p();return v(n.NextPage(!0))})("fetchTotalData",function(){x(e);let n=p();return v(n.StoreRowsCountAPIResult("Inventory/GetCountProductInventoryTraffic"))}),o()}if(t&2){let e,u,n=p();_("totalData",n.listTotal())("totalCurrentRow",n.infiniteList==null?null:n.infiniteList.length)("pageNumber",(e=n.pageData())==null||e.Filter==null?null:e.Filter.PageNumber)("nextPageDisabled",n.nextPageDisabled())("isFetchTotalData",(u=n.pageData())==null?null:u.HideStoreApiCount)("hasShowAllButton",!1)("goToLast",n.goToLast())}}var st=class t extends J{constructor(e,u,n,s,w,h,$t){super(e,u,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=u;this.csvConverter=n;this.pageTitle=s;this.converter=w;this.roleService=h;this.matDialog=$t;this.pageTitle.setTitle(this.menuData().T)}httpService;csvConverter;pageTitle;converter;roleService;matDialog;column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData().H=this.data().PageTitle}openExportModal(){this.matDialog.open(U,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData().Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(u){return new(u||t)(T(Y),T(R),T($),T(A),T(ct),T(Z),T(K))};static \u0275cmp=B({type:t,selectors:[["POS-product-inventory-traffic"]],features:[L],decls:31,vars:19,consts:[["pageFilterTemplate",""],["filterDialogWidth","600px",3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[3,"totalData","totalCurrentRow","pageNumber","nextPageDisabled","isFetchTotalData","hasShowAllButton","goToLast"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter","grid-filter"],[1,"filter-item"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[1,"filter-item","mt-4"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["appendTo","body",3,"modelNameChange","autoZIndex","overlayStyle","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],[1,"filter-item","mt-8"],[1,"mb-5"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[3,"nextPage","fetchTotalData","totalData","totalCurrentRow","pageNumber","nextPageDisabled","isFetchTotalData","hasShowAllButton","goToLast"]],template:function(u,n){if(u&1){let s=P();a(0,"mainpanel-cmp",1),b("onSubmit",function(){return n.searchFromPageOne()}),S("filterChange",function(h){return x(s),I(n.pageData().Filter,h)||(n.pageData().Filter=h),v(h)}),a(1,"actions"),c(2,xt,3,0,"button",2),o(),a(3,"filters"),O(4,vt,25,23,"ng-template",null,0,k),o(),a(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),o(),a(14,"th"),r(15,"Product"),o(),c(16,Tt,2,0,"th",8),c(17,gt,3,0,"th",9),c(18,It,3,0,"th",9),c(19,St,3,0,"th",9),c(20,Pt,3,0,"th",9),c(21,ht,3,0,"th",9),c(22,bt,3,0,"th",9),c(23,Ft,3,0,"th",9),c(24,Dt,3,0,"th",9),c(25,Et,3,0,"th",9),o()(),a(26,"tbody"),c(27,At,2,0)(28,Gt,3,0,"tr"),o(),c(29,Xt,12,9,"tfoot"),o()(),c(30,Yt,1,7,"infinite-pagination",10),o()()()}u&2&&(_("pageData",n.menuData())("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",n.pageData().Filter),_("column",n.column),i(2),d(n.roleService.global.Export?2:-1),i(14),d(n.column.code.selected?16:-1),i(),d(n.column.start.selected?17:-1),i(),d(n.column.bought.selected?18:-1),i(),d(n.column.sold.selected?19:-1),i(),d(n.column.transferredIn.selected?20:-1),i(),d(n.column.transferredOut.selected?21:-1),i(),d(n.column.adjust.selected?22:-1),i(),d(n.column.end.selected?23:-1),i(),d(n.column.now.selected?24:-1),i(),d(n.column.percent.selected?25:-1),i(2),d(n.infiniteList&&n.infiniteList.length>0?27:28),i(2),d(n.infiniteList&&n.infiniteList.length>0?29:-1),i(),d(n.infiniteList.length>0?30:-1))},dependencies:[nt,it,j,H,pt,at,mt,et,G,lt,ot,dt,ut,Q,z,rt,tt,X],encapsulation:2,changeDetection:0})};export{st as Product_Inventory_TrafficComponent};
|
|
1
|
+
import{a as ut}from"./chunk-6OBQBKFY.js";import{a as ct}from"./chunk-OOM5PVY3.js";import{a as mt}from"./chunk-VI3LBGKH.js";import{a as pt}from"./chunk-7Q4AUIVO.js";import"./chunk-JMX6YATG.js";import{a as rt}from"./chunk-6HFBSHJM.js";import"./chunk-QQIQIEGB.js";import{a as dt}from"./chunk-5ZLUGPDD.js";import{p as lt}from"./chunk-MBGAESMM.js";import"./chunk-HKSZBGAA.js";import"./chunk-NJMXSMGX.js";import"./chunk-OLQFDT22.js";import"./chunk-EBUYDS2Y.js";import"./chunk-NNQ7YV45.js";import"./chunk-6P2JYVLD.js";import"./chunk-QZZUM4LW.js";import{a as X}from"./chunk-5CEKVGU3.js";import{d as ot}from"./chunk-ZKYNE6HS.js";import"./chunk-EIELIV2M.js";import{a as J}from"./chunk-AKE5WABY.js";import{b as at}from"./chunk-WL6NC2OF.js";import"./chunk-2F4L5DVJ.js";import"./chunk-S6ZAQHVT.js";import"./chunk-ZF4NXOMF.js";import"./chunk-QJD34HI5.js";import"./chunk-CAAMTPNT.js";import"./chunk-MKTK2W67.js";import{b as U}from"./chunk-FLWBWEFM.js";import"./chunk-PZF3LDGE.js";import"./chunk-ZLK3WUVC.js";import"./chunk-DN5O5MXB.js";import"./chunk-MINZY3EE.js";import"./chunk-MEYOCIHN.js";import"./chunk-VZUG3XWW.js";import{a as $}from"./chunk-AFSEESTO.js";import{g as it,h as nt}from"./chunk-ZECM4QI3.js";import"./chunk-JYQ3MWVH.js";import"./chunk-EBJVGAD5.js";import"./chunk-LCKY37ME.js";import"./chunk-V45IFCCW.js";import"./chunk-JQXAL6J7.js";import"./chunk-FJBCJO4M.js";import"./chunk-FJAZ5KHI.js";import"./chunk-TECII4TC.js";import"./chunk-N7XFZYAR.js";import"./chunk-NHMVI3RX.js";import"./chunk-CER4VIHT.js";import"./chunk-KVRVSMPL.js";import"./chunk-EXCHBF25.js";import"./chunk-SVRHZOWH.js";import"./chunk-IHQOHLPL.js";import"./chunk-BFQOLYHL.js";import"./chunk-K2NOGF3I.js";import"./chunk-VGO576ND.js";import{a as Y}from"./chunk-Z3EOVFO3.js";import"./chunk-JQBXKYC5.js";import"./chunk-QAEDK7B5.js";import"./chunk-J465KXQF.js";import"./chunk-73C77AIF.js";import"./chunk-BOBU77RE.js";import"./chunk-XSPKXHFT.js";import{a as z,b as Q}from"./chunk-SWU6BBBD.js";import"./chunk-PPMQE2JW.js";import{N as et,g as tt}from"./chunk-WCOJ74AX.js";import"./chunk-IN35LCD3.js";import"./chunk-SJQTGNAQ.js";import"./chunk-OKQYRKDJ.js";import"./chunk-NCJEZXKF.js";import"./chunk-STKAHNNR.js";import"./chunk-HDGXBAHJ.js";import{c as K}from"./chunk-QX4FSLL5.js";import"./chunk-YXX2TH5I.js";import"./chunk-M36GLXBG.js";import"./chunk-CVOK5ITC.js";import"./chunk-J27WSAUU.js";import"./chunk-4KUDABAJ.js";import"./chunk-HTWZXTKN.js";import"./chunk-L22C7OZ4.js";import"./chunk-SFD3J3OH.js";import"./chunk-N3XC43X2.js";import"./chunk-FNEABRAQ.js";import"./chunk-OSHL72QK.js";import"./chunk-3A7EKFZY.js";import"./chunk-POOTZU2L.js";import"./chunk-MMZCS6WY.js";import{F as H}from"./chunk-F2ZXIBKA.js";import"./chunk-6MQHDKTC.js";import"./chunk-MNNHJRKM.js";import"./chunk-FQIRVQPI.js";import{b as Z}from"./chunk-36E5M6EH.js";import"./chunk-PPTZHIIZ.js";import"./chunk-F77BOG5V.js";import{q as R}from"./chunk-WE775XUV.js";import{Ac as F,Bb as d,Bc as E,Cb as M,Eb as N,Fb as W,Gb as _,Hb as a,Ib as o,Ic as m,Jb as D,Jc as C,Kc as y,Nd as A,Oc as k,Sb as P,Ud as G,Vb as b,Xa as i,Xb as p,cb as T,gb as B,kc as r,lb as L,lc as q,mb as O,mc as f,pc as g,qc as I,rc as S,ua as x,va as v,vb as V,zb as c,zd as j}from"./chunk-T7N5CA5W.js";import"./chunk-NF7PG5F2.js";var ft=()=>({maxWidth:"none"}),Ct=()=>["/menu/Outlets/Master/Outlets/Info"],_t=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function xt(t,l){if(t&1){let e=P();a(0,"button",11),b("click",function(){x(e);let n=p();return v(n.openExportModal())}),D(1,"i",12),r(2," Export "),o()}}function vt(t,l){if(t&1){let e=P();a(0,"div",13)(1,"div",14)(2,"h6"),r(3,"Outlet Group"),o(),a(4,"POS-outlet-group-tree-select",15),S("selectedOutletGroupIDChange",function(n){x(e);let s=p();return I(s.pageData().Filter.OutletGroupID,n)||(s.pageData().Filter.OutletGroupID=n),v(n)}),o()(),a(5,"div",14)(6,"h6"),r(7,"Category"),o(),a(8,"POS-product-category-select",16),S("selectedCategoryIDChange",function(n){x(e);let s=p();return I(s.pageData().Filter.CategoryID,n)||(s.pageData().Filter.CategoryID=n),v(n)}),o()(),a(9,"div",17)(10,"h6"),r(11,"From Date"),o(),a(12,"div")(13,"datepicker",18),S("dateChange",function(n){x(e);let s=p();return I(s.pageData().Filter.From,n)||(s.pageData().Filter.From=n),v(n)}),o()()(),a(14,"div",17)(15,"h6"),r(16,"To Date"),o(),a(17,"div")(18,"datepicker",19),S("dateChange",function(n){x(e);let s=p();return I(s.pageData().Filter.To,n)||(s.pageData().Filter.To=n),v(n)}),o()()(),a(19,"div",14)(20,"autocompleteV3",20),S("modelNameChange",function(n){x(e);let s=p();return I(s.pageData().Filter.ListProductID,n)||(s.pageData().Filter.ListProductID=n),v(n)}),o()(),a(21,"div",21)(22,"h6",22),r(23,"Inventory Type"),o(),a(24,"radio-options",23),S("modelChange",function(n){x(e);let s=p();return I(s.pageData().Filter.InventoryType,n)||(s.pageData().Filter.InventoryType=n),v(n)}),o()()()}if(t&2){let e=p();i(4),_("showClear",!0),g("selectedOutletGroupID",e.pageData().Filter.OutletGroupID),i(4),g("selectedCategoryID",e.pageData().Filter.CategoryID),_("showClear",!0),i(5),_("isFloatingLabel",!1),g("date",e.pageData().Filter.From),_("hidelClearBtn",!0),i(5),_("isFloatingLabel",!1),g("date",e.pageData().Filter.To),_("hidelClearBtn",!0),i(2),_("autoZIndex",!0)("overlayStyle",F(22,ft)),g("modelName",e.pageData().Filter.ListProductID),_("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),g("model",e.pageData().Filter.InventoryType),_("options",e.pageData().Options.InventoryTypes)}}function Tt(t,l){t&1&&(a(0,"th",8),r(1,"Code"),o())}function gt(t,l){t&1&&(a(0,"th",9)(1,"span",24),r(2," Start "),o()())}function It(t,l){t&1&&(a(0,"th",9)(1,"span",25),r(2," Bought "),o()())}function St(t,l){t&1&&(a(0,"th",9)(1,"span",26),r(2," Sold "),o()())}function Pt(t,l){t&1&&(a(0,"th",9)(1,"span",27),r(2," T.In "),o()())}function ht(t,l){t&1&&(a(0,"th",9)(1,"span",28),r(2," T.Out "),o()())}function bt(t,l){t&1&&(a(0,"th",9)(1,"span",29),r(2," Adj "),o()())}function Ft(t,l){t&1&&(a(0,"th",9)(1,"span",30),r(2," End "),o()())}function Dt(t,l){t&1&&(a(0,"th",9)(1,"span",31),r(2," Now "),o()())}function Et(t,l){t&1&&(a(0,"th",9)(1,"span",32),r(2," % "),o()())}function wt(t,l){if(t&1&&(a(0,"td",34),r(1),o()),t&2){let e=p().$implicit;i(),f(" ",e.ProductCode," ")}}function Bt(t,l){if(t&1&&(a(0,"td",35),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;_("colsFontColor",e.Start),i(),f(" ",C(2,2,e.Start)," ")}}function Lt(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.Bought)," ")}}function Ot(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.Sold)," ")}}function Vt(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.TransferredIn)," ")}}function Mt(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.TransferredOut)," ")}}function Nt(t,l){if(t&1&&(a(0,"td",35),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;_("colsFontColor",e.Adjustment),i(),f(" ",e.Adjustment<0?e.Adjustment*-1:C(2,2,e.Adjustment)," ")}}function Wt(t,l){if(t&1&&(a(0,"td",35),r(1),o()),t&2){let e=p().$implicit;_("colsFontColor",e.End),i(),f(" ",e.End," ")}}function qt(t,l){if(t&1&&(a(0,"td",35),r(1),o()),t&2){let e=p().$implicit;_("colsFontColor",e.Now),i(),f(" ",e.Now," ")}}function kt(t,l){if(t&1&&(a(0,"td",34),r(1),m(2,"quantityFraction"),o()),t&2){let e=p().$implicit;i(),f(" ",C(2,1,e.SellTransferInRate)," ")}}function jt(t,l){if(t&1&&(a(0,"tr")(1,"td")(2,"a",33),r(3),o()(),a(4,"td")(5,"a",33),r(6),o()(),c(7,wt,2,1,"td",34),c(8,Bt,3,4,"td",35),c(9,Lt,3,3,"td",36),c(10,Ot,3,3,"td",37),c(11,Vt,3,3,"td",36),c(12,Mt,3,3,"td",37),c(13,Nt,3,4,"td",35),c(14,Wt,2,2,"td",35),c(15,qt,2,2,"td",35),c(16,kt,3,3,"td",34),o()),t&2){let e=l.$implicit,u=p(2);i(2),_("routerLink",F(16,Ct))("queryParams",E(17,_t,e.OutletID)),i(),f(" ",e.OutletName," "),i(2),_("routerLink",F(19,yt))("queryParams",E(20,_t,e.ProductID)),i(),q(e.ProductName),i(),d(u.column.code.selected?7:-1),i(),d(u.column.start.selected?8:-1),i(),d(u.column.bought.selected?9:-1),i(),d(u.column.sold.selected?10:-1),i(),d(u.column.transferredIn.selected?11:-1),i(),d(u.column.transferredOut.selected?12:-1),i(),d(u.column.adjust.selected?13:-1),i(),d(u.column.end.selected?14:-1),i(),d(u.column.now.selected?15:-1),i(),d(u.column.percent.selected?16:-1)}}function At(t,l){if(t&1&&N(0,jt,17,22,"tr",null,M),t&2){let e=p();W(e.infiniteList)}}function Gt(t,l){t&1&&(a(0,"tr")(1,"td",38),D(2,"app-empty-state"),o()())}function Rt(t,l){if(t&1&&(a(0,"td",35),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"Start"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"Start"))," ")}}function Ht(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"Bought"))," ")}}function Zt(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"Sold"))," ")}}function zt(t,l){if(t&1&&(a(0,"td",36),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"TransferredIn"))," ")}}function Qt(t,l){if(t&1&&(a(0,"td",37),r(1),m(2,"sum"),m(3,"quantityFraction"),o()),t&2){let e=p(2);i(),f(" ",C(3,4,y(2,1,e.infiniteList,"TransferredOut"))," ")}}function Jt(t,l){if(t&1&&(a(0,"td",41),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"Adjustment"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"Adjustment"))," ")}}function Kt(t,l){if(t&1&&(a(0,"td",35),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"End"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"End"))," ")}}function Ut(t,l){if(t&1&&(a(0,"td",35),m(1,"sum"),m(2,"quantityFraction"),r(3),m(4,"sum"),m(5,"quantityFraction"),o()),t&2){let e=p(2);_("colsFontColor",C(2,5,y(1,2,e.infiniteList,"Now"))),i(3),f(" ",C(5,10,y(4,7,e.infiniteList,"Now"))," ")}}function Xt(t,l){if(t&1&&(a(0,"tfoot")(1,"tr",39)(2,"th",40),r(3," Total: "),o(),c(4,Rt,6,12,"td",35),c(5,Ht,4,6,"td",36),c(6,Zt,4,6,"td",37),c(7,zt,4,6,"td",36),c(8,Qt,4,6,"td",37),c(9,Jt,6,12,"td",41),c(10,Kt,6,12,"td",35),c(11,Ut,6,12,"td",35),o()()),t&2){let e=p();i(2),V("colspan",e.column.code.selected?3:2),i(2),d(e.column.start.selected?4:-1),i(),d(e.column.bought.selected?5:-1),i(),d(e.column.sold.selected?6:-1),i(),d(e.column.transferredIn.selected?7:-1),i(),d(e.column.transferredOut.selected?8:-1),i(),d(e.column.adjust.selected?9:-1),i(),d(e.column.end.selected?10:-1),i(),d(e.column.now.selected?11:-1)}}function Yt(t,l){if(t&1){let e=P();a(0,"infinite-pagination",42),b("nextPage",function(){x(e);let n=p();return v(n.NextPage(!0))})("fetchTotalData",function(){x(e);let n=p();return v(n.StoreRowsCountAPIResult("Inventory/GetCountProductInventoryTraffic"))}),o()}if(t&2){let e,u,n=p();_("totalData",n.listTotal())("totalCurrentRow",n.infiniteList==null?null:n.infiniteList.length)("pageNumber",(e=n.pageData())==null||e.Filter==null?null:e.Filter.PageNumber)("nextPageDisabled",n.nextPageDisabled())("isFetchTotalData",(u=n.pageData())==null?null:u.HideStoreApiCount)("hasShowAllButton",!1)("goToLast",n.goToLast())}}var st=class t extends J{constructor(e,u,n,s,w,h,$t){super(e,u,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=u;this.csvConverter=n;this.pageTitle=s;this.converter=w;this.roleService=h;this.matDialog=$t;this.pageTitle.setTitle(this.menuData().T)}httpService;csvConverter;pageTitle;converter;roleService;matDialog;column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData().H=this.data().PageTitle}openExportModal(){this.matDialog.open(U,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData().Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(u){return new(u||t)(T(Y),T(R),T($),T(A),T(ct),T(Z),T(K))};static \u0275cmp=B({type:t,selectors:[["POS-product-inventory-traffic"]],features:[L],decls:31,vars:19,consts:[["pageFilterTemplate",""],["filterDialogWidth","600px",3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[3,"totalData","totalCurrentRow","pageNumber","nextPageDisabled","isFetchTotalData","hasShowAllButton","goToLast"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter","grid-filter"],[1,"filter-item"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[1,"filter-item","mt-4"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["appendTo","body",3,"modelNameChange","autoZIndex","overlayStyle","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],[1,"filter-item","mt-8"],[1,"mb-5"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[3,"nextPage","fetchTotalData","totalData","totalCurrentRow","pageNumber","nextPageDisabled","isFetchTotalData","hasShowAllButton","goToLast"]],template:function(u,n){if(u&1){let s=P();a(0,"mainpanel-cmp",1),b("onSubmit",function(){return n.searchFromPageOne()}),S("filterChange",function(h){return x(s),I(n.pageData().Filter,h)||(n.pageData().Filter=h),v(h)}),a(1,"actions"),c(2,xt,3,0,"button",2),o(),a(3,"filters"),O(4,vt,25,23,"ng-template",null,0,k),o(),a(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),o(),a(14,"th"),r(15,"Product"),o(),c(16,Tt,2,0,"th",8),c(17,gt,3,0,"th",9),c(18,It,3,0,"th",9),c(19,St,3,0,"th",9),c(20,Pt,3,0,"th",9),c(21,ht,3,0,"th",9),c(22,bt,3,0,"th",9),c(23,Ft,3,0,"th",9),c(24,Dt,3,0,"th",9),c(25,Et,3,0,"th",9),o()(),a(26,"tbody"),c(27,At,2,0)(28,Gt,3,0,"tr"),o(),c(29,Xt,12,9,"tfoot"),o()(),c(30,Yt,1,7,"infinite-pagination",10),o()()()}u&2&&(_("pageData",n.menuData())("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",n.pageData().Filter),_("column",n.column),i(2),d(n.roleService.global.Export?2:-1),i(14),d(n.column.code.selected?16:-1),i(),d(n.column.start.selected?17:-1),i(),d(n.column.bought.selected?18:-1),i(),d(n.column.sold.selected?19:-1),i(),d(n.column.transferredIn.selected?20:-1),i(),d(n.column.transferredOut.selected?21:-1),i(),d(n.column.adjust.selected?22:-1),i(),d(n.column.end.selected?23:-1),i(),d(n.column.now.selected?24:-1),i(),d(n.column.percent.selected?25:-1),i(2),d(n.infiniteList&&n.infiniteList.length>0?27:28),i(2),d(n.infiniteList&&n.infiniteList.length>0?29:-1),i(),d(n.infiniteList.length>0?30:-1))},dependencies:[nt,it,j,H,pt,at,mt,et,G,lt,ot,dt,ut,Q,z,rt,tt,X],encapsulation:2,changeDetection:0})};export{st as Product_Inventory_TrafficComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
1
|
+
import{a as g}from"./chunk-DN5O5MXB.js";import{Ea as p,Ga as h,f as l}from"./chunk-T7N5CA5W.js";var u=class extends g{constructor(t,e,s,i,n,a,r,o,c="post",D="post"){super(t,e,s,i,n,a,r,c,D);this.httpService=e;this.toastrService=n;this.route=a;this.cdr=o;this.dataMethod=c;this.loaderMethod=D;o&&h(()=>{this.infiniteListSignal(),this.cdr.markForCheck()})}httpService;toastrService;route;cdr;dataMethod;loaderMethod;toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal=0;_infiniteList$=new l([]);infiniteListSignal=p([]);get infiniteList(){return this._infiniteList$.value}set infiniteList(t){this._infiniteList$.next(t),this.infiniteListSignal.set(t)}originalData=[];StoreRowsCountAPIResult(t,e=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(s=>{this.listTotal=s.Count,this.pageData.HideStoreApiCount=!0,e&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData()),this.cdr&&this.cdr.markForCheck()})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let e=Array.isArray(t.Data?.hits),s=Array.isArray(t.Data?.[0]?.Variants),i=[...this.infiniteList];if(this.extendData){let a=i.at(-1),r=t.Data.find(o=>o.ID===a?.ID);if(s&&a)if(r){let o=t.Data.filter(c=>c.ID!==a?.ID);a.Variants=a.Variants.concat(r.Variants||[]),i=i.concat(o)}else i=i.concat(t.Data);else i=i.concat(e?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else i=e?t.Data.hits:t.Data,this.assignAggregate(t);this.infiniteList=i,this.originalData=[...i];let n=e?t.Data.hits.length:t.Data.length;this.nextPageDisabled=n<this.pageData.Filter.RowCount,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t),this.cdr?.markForCheck?.()}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}onSelectAllData(t){super.onSelectAllData(t),this.infiniteList=this.infiniteList.map(e=>(e.selected=t,e))}};export{u as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Li,b as Wi}from"./chunk-RKMI2Q2I.js";import{a as Ri}from"./chunk-YGGKHDUY.js";import{a as Bi}from"./chunk-VRCLIGZL.js";import{a as Fi}from"./chunk-2ILX7NKZ.js";import{a as gt,b as Ae}from"./chunk-N6UN5VE7.js";import"./chunk-GSNMJQ66.js";import{b as Vi,c as Ai}from"./chunk-4ZWV4E3W.js";import{b as ki,c as xt}from"./chunk-LSUMGHL2.js";import{p as Te}from"./chunk-MBGAESMM.js";import"./chunk-HKSZBGAA.js";import"./chunk-NJMXSMGX.js";import"./chunk-OLQFDT22.js";import"./chunk-EBUYDS2Y.js";import"./chunk-NNQ7YV45.js";import"./chunk-6P2JYVLD.js";import{a as yi,b as vi}from"./chunk-RR5NUJBY.js";import{a as ft}from"./chunk-
|
|
1
|
+
import{a as Li,b as Wi}from"./chunk-RKMI2Q2I.js";import{a as Ri}from"./chunk-YGGKHDUY.js";import{a as Bi}from"./chunk-VRCLIGZL.js";import{a as Fi}from"./chunk-2ILX7NKZ.js";import{a as gt,b as Ae}from"./chunk-N6UN5VE7.js";import"./chunk-GSNMJQ66.js";import{b as Vi,c as Ai}from"./chunk-4ZWV4E3W.js";import{b as ki,c as xt}from"./chunk-LSUMGHL2.js";import{p as Te}from"./chunk-MBGAESMM.js";import"./chunk-HKSZBGAA.js";import"./chunk-NJMXSMGX.js";import"./chunk-OLQFDT22.js";import"./chunk-EBUYDS2Y.js";import"./chunk-NNQ7YV45.js";import"./chunk-6P2JYVLD.js";import{a as yi,b as vi}from"./chunk-RR5NUJBY.js";import{a as ft}from"./chunk-XCLPKPIN.js";import"./chunk-QGOIWDCS.js";import"./chunk-5CEKVGU3.js";import{d as bt}from"./chunk-ZKYNE6HS.js";import"./chunk-EIELIV2M.js";import{a as Oi,b as Ni}from"./chunk-QTFS4U6J.js";import{b as hi}from"./chunk-FLWBWEFM.js";import{a as Re}from"./chunk-PZF3LDGE.js";import{b as Ii}from"./chunk-ZLK3WUVC.js";import"./chunk-DN5O5MXB.js";import"./chunk-MINZY3EE.js";import"./chunk-MEYOCIHN.js";import{g as re,h as Be}from"./chunk-ZECM4QI3.js";import"./chunk-LCKY37ME.js";import{a as xi}from"./chunk-V45IFCCW.js";import"./chunk-NHMVI3RX.js";import"./chunk-EXCHBF25.js";import"./chunk-SVRHZOWH.js";import"./chunk-IHQOHLPL.js";import"./chunk-BFQOLYHL.js";import"./chunk-K2NOGF3I.js";import"./chunk-VGO576ND.js";import{a as ge}from"./chunk-Z3EOVFO3.js";import"./chunk-JQBXKYC5.js";import"./chunk-QAEDK7B5.js";import{b as Ei,c as Pi}from"./chunk-J465KXQF.js";import"./chunk-73C77AIF.js";import"./chunk-BOBU77RE.js";import"./chunk-XSPKXHFT.js";import{a as Me,b as _t}from"./chunk-SWU6BBBD.js";import"./chunk-PPMQE2JW.js";import{F as Di,N as Ti,g as Si,o as Mi,s as wi}from"./chunk-WCOJ74AX.js";import{a as ui}from"./chunk-SJQTGNAQ.js";import"./chunk-OKQYRKDJ.js";import{d as De,e as Ct}from"./chunk-NCJEZXKF.js";import"./chunk-STKAHNNR.js";import"./chunk-HDGXBAHJ.js";import{a as oe,b as we,c as ae}from"./chunk-QX4FSLL5.js";import"./chunk-YXX2TH5I.js";import"./chunk-M36GLXBG.js";import"./chunk-CVOK5ITC.js";import"./chunk-J27WSAUU.js";import{a as Lt}from"./chunk-4KUDABAJ.js";import"./chunk-HTWZXTKN.js";import"./chunk-L22C7OZ4.js";import"./chunk-SFD3J3OH.js";import"./chunk-N3XC43X2.js";import{a as L,b as ee,c as Z}from"./chunk-FNEABRAQ.js";import"./chunk-OSHL72QK.js";import"./chunk-3A7EKFZY.js";import"./chunk-POOTZU2L.js";import"./chunk-MMZCS6WY.js";import{A as ct,C as gi,D as mt,E as Ci,F as ne,G as pt,c as Y,e as Wt,h as B,i as ve,l as Ve,p as W,q as Se,w as fi,x as _i}from"./chunk-F2ZXIBKA.js";import"./chunk-6MQHDKTC.js";import"./chunk-MNNHJRKM.js";import"./chunk-FQIRVQPI.js";import{a as bi,b as ut}from"./chunk-36E5M6EH.js";import{a as $}from"./chunk-PPTZHIIZ.js";import{a as Qe}from"./chunk-F77BOG5V.js";import{n as Q,q as P}from"./chunk-WE775XUV.js";import{Aa as Kt,Ac as ai,Bb as p,Bc as A,Ca as Zt,Cb as at,Cc as rt,Db as R,Ea as E,Eb as N,F as de,Fb as F,Fc as ri,Ga as Jt,Gb as u,Ha as Xt,Hb as n,Ib as i,Ic as b,Jb as g,Jc as D,Kc as O,Lc as li,Nd as pi,O as Qt,Oc as si,Qa as q,Rc as lt,Rd as st,Sa as Ne,Sb as v,Td as ke,Ud as dt,Vb as C,Wc as V,Wd as Bt,Xa as s,Xb as d,_ as et,_c as G,c as Je,ca as J,cb as x,f as Xe,fc as X,ga as tt,gb as T,hb as nt,hc as Fe,ic as ei,jc as Ie,kc as r,lb as ue,lc as h,m as $t,ma as pe,mb as ot,mc as y,md as ye,na as it,nc as Oe,oc as Ge,pa as ie,pc as S,pd as di,qa as H,qc as M,qd as ci,rc as w,sc as ti,sd as mi,t as se,ua as f,ud as j,va as _,vc as ii,wc as ni,wd as fe,x as Gt,za as Yt,zb as m,zc as oi,zd as _e}from"./chunk-T7N5CA5W.js";import{a as xe,b as he}from"./chunk-NF7PG5F2.js";function Ht(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Gi="0123456789ABCDEFGHIJKLMNOPQRSTUV",Qi="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function jt(t,l,e){e=e||{};let o,a;switch(l){case"RFC3548":case"RFC4648":o=$i,a=!0;break;case"RFC4648-HEX":o=Gi,a=!0;break;case"Crockford":o=Qi,a=!1;break;default:throw new Error("Unknown base32 variant: "+l)}let c=e.padding!==void 0?e.padding:a,I=Ht(t),K=0,be=0,me="";for(let $e=0;$e<I.byteLength;$e++)for(be=be<<8|I.getUint8($e),K+=8;K>=5;)me+=o[be>>>K-5&31],K-=5;if(K>0&&(me+=o[be<<5-K&31]),c)for(;me.length%8!==0;)me+="=";return me}var Le=class t{dialogRef=H(oe);config=this.initConfig();initConfig(){let l=new ee;return l.okText="Disable Two Factor Authentication",l.customWidth="500px",l.title="DIsabled Two Factor Authentication",l.headerType=L.Warning,l}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=T({type:t,selectors:[["POS-modal-confirmation-disabled"]],decls:5,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(e,o){e&1&&(n(0,"modal-material",0),C("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"div",1)(3,"p",2),r(4,"Are you sure you want to disable two factor authentication for your account? "),i()()()()),e&2&&u("config",o.config)},dependencies:[Z],encapsulation:2,changeDetection:0})};function Yi(t,l){if(t&1){let e=v();n(0,"div")(1,"div",1),r(2," Two Factor Authentication Status: "),n(3,"span",2),r(4,"Enabled"),i()()(),n(5,"div",3)(6,"button",4),C("click",function(){f(e);let a=d();return _(a.onDisableTotp())}),r(7," Disable Two Factor Authentication "),i()()}}function Ki(t,l){if(t&1){let e=v();n(0,"div",5)(1,"div",6)(2,"h4"),r(3,"Connect Your DealPOS account to an Authenticator Application"),i(),n(4,"p"),r(5," Secure your login with One Time Password using an Authenticator Application! "),i()()(),n(6,"div",5)(7,"div",6)(8,"ol",7)(9,"li",8)(10,"h5"),r(11,"Download Authenticator application"),i(),n(12,"div",9)(13,"a",10),g(14,"img",11),r(15," Microsoft Authenticator "),i(),n(16,"a",12),g(17,"img",13),r(18," Google Authenticator "),i()()(),n(19,"li",14)(20,"h5"),r(21,"Scan the QR code below"),i(),n(22,"div",3),g(23,"qr-code",15),i()(),n(24,"li",14)(25,"h5"),r(26,"Validate your QR Code"),i(),n(27,"form",16),C("submit",function(){f(e);let a=d();return _(a.onValidate())}),n(28,"div")(29,"input",17),C("keypress",function(a){f(e);let c=d();return _(c.numberOnly(a))}),w("ngModelChange",function(a){f(e);let c=d();return M(c.validationCode,a)||(c.validationCode=a),_(a)}),i()(),n(30,"div",3)(31,"button",18),r(32," Validate "),i()()()()()()()}if(t&2){let e=d();s(23),u("value",e.qrcodeContent())("size",265),s(6),S("ngModel",e.validationCode)}}var We=class t{document=H(Yt);authenticatorService=H(ft);toastrService=H(Q);dialog=H(ae);destroyRef=H(Kt);totpEnabled=G(!1);qrcodeContent=E("");validationCode=E("");secretKey=E("");constructor(){this.generateQrCodeContent()}generateQrCodeContent(){let l=this.getDomainName(),e=this.generateRandomSecret();this.secretKey.set(e);let a=$.parseJwt(localStorage.getItem("Token")).LID;this.qrcodeContent.set(`otpauth://totp/${a}?secret=${e}&issuer=${l}`)}generateRandomSecret(){let l=$.Guid_NewGuid(),e=new TextEncoder().encode(l);return jt(e,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){if(!this.validateOnVerfiyCode())return;let l={SecretKey:this.secretKey(),ValidationCode:this.validationCode(),Enabled:!0};this.authenticatorService.configure2FA(l).pipe(Lt(this.destroyRef)).subscribe(e=>{this.toastrService.success(e.Message,"TOTP Enabled"),this.totpEnabled.set(!0)})}validateOnVerfiyCode(){return $.IsEmpty(this.validationCode())?(this.toastrService.warning("You must enter a authentication code.","Warning"),!1):this.validationCode().length!==6?(this.toastrService.warning("The authentication code must be six digits long.","Warning"),!1):!0}numberOnly(l){return $.numberOnly(l)}onDisableTotp(){this.dialog.open(Le).afterClosed().pipe(de(l=>$.IsNotEmpty(l)),J(()=>this.authenticatorService.disableTwoFactorAuthentication()),Lt(this.destroyRef)).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Disabled"),this.totpEnabled.set(!1)})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=T({type:t,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:[1,"totpEnabled"]},outputs:{totpEnabled:"totpEnabledChange"},decls:3,vars:1,consts:[[1,"container-fluid","mt-6"],[1,"d-inline-block","fs-5"],[1,"text-success","fw-bold"],[1,"mt-6"],["type","button","type","submit",1,"btn","btn-sm","btn-danger",3,"click"],[1,"row"],[1,"col-12"],[1,"ps-7"],[1,"fw-bold"],[1,"d-flex","align-items-center","mt-6"],["href","https://play.google.com/store/apps/details?id=com.azure.authenticator","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Microsoft_Authenticator.png",2,"width","35px"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Google_Authenticator.png",2,"width","35px"],[1,"fw-bold","mt-6"],["errorCorrectionLevel","H",1,"qr2fa",3,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(e,o){e&1&&(n(0,"div",0),m(1,Yi,8,0)(2,Ki,33,3),i()),e&2&&(s(),p(o.totpEnabled()?1:2))},dependencies:[ne,Se,Y,B,ve,W,Ve,xt,ki],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})};var Ut=t=>({active:t}),Hi=t=>({"ng-invalid ng-dirty":t}),Xi=(t,l)=>({border:t,"border-danger":l}),en=t=>({"border-top-0":t});function tn(t,l){if(t&1){let e=v();n(0,"button",66),C("click",function(){f(e);let a=d(3);return _(a.validate())}),r(1," Submit "),i()}if(t&2){d(2);let e=X(36);u("disabled",e==null||e.form==null?null:e.form.invalid)}}function nn(t,l){if(t&1&&m(0,tn,2,1,"button",65),t&2){let e=d(2);p(!(e.roleService==null||e.roleService.users==null)&&e.roleService.users.View||!(e.roleService==null||e.roleService.profile==null)&&e.roleService.profile.View?0:-1)}}function on(t,l){t&1&&(n(0,"small",69),r(1,"*Email is required"),i())}function an(t,l){t&1&&(n(0,"small",69),r(1,"*Enter a valid email address"),i())}function rn(t,l){if(t&1&&(m(0,on,2,0,"small",69),m(1,an,2,0,"small",69)),t&2){d();let e=X(4);p(e.errors!=null&&e.errors.required?0:-1),s(),p(e.errors!=null&&e.errors.pattern?1:-1)}}function ln(t,l){if(t&1){let e=v();n(0,"div",23)(1,"label",67),r(2," Email "),i(),n(3,"input",68,3),w("ngModelChange",function(a){f(e);let c=d(2);return M(c.formData.Email,a)||(c.formData.Email=a),_(a)}),i(),m(5,rn,2,2),i()}if(t&2){let e=X(4),o=d(2);s(3),Ie(rt(5,Xi,e.touched&&e.invalid,e.touched&&e.invalid)),S("ngModel",o.formData.Email),u("disabled",!(!(o.roleService==null||o.roleService.users==null)&&o.roleService.users.View||!(o.roleService==null||o.roleService.profile==null)&&o.roleService.profile.View)),s(2),p(e.touched?5:-1)}}function sn(t,l){t&1&&(n(0,"small",69),r(1,"*Enter a valid email address"),i())}function dn(t,l){if(t&1&&m(0,sn,2,0,"small",69),t&2){d();let e=X(4);p(e.errors!=null&&e.errors.pattern?0:-1)}}function cn(t,l){if(t&1){let e=v();n(0,"div",23)(1,"label",67),r(2," Email "),i(),n(3,"input",70,3),w("ngModelChange",function(a){f(e);let c=d(2);return M(c.formData.Email,a)||(c.formData.Email=a),_(a)}),i(),m(5,dn,1,1),i()}if(t&2){let e=X(4),o=d(2);s(3),u("disabled",!(!(o.roleService==null||o.roleService.users==null)&&o.roleService.users.View||!(o.roleService==null||o.roleService.profile==null)&&o.roleService.profile.View)),S("ngModel",o.formData.Email),s(2),p(e.touched?5:-1)}}function mn(t,l){t&1&&(n(0,"i",34),r(1," Password is required. "),i())}function pn(t,l){t&1&&(n(0,"i",34),r(1," These passwords don't match."),i())}function un(t,l){if(t&1&&(n(0,"ul",41)(1,"li",71),r(2),i()()),t&2){let e=l.$implicit;s(2),h(e)}}function fn(t,l){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i()()),t&2){let e=l.$implicit,o=l.$index;s(2),h(o+1),s(2),h(e.Key),s(2),h(e.Value)}}function _n(t,l){if(t&1&&(n(0,"ul",41)(1,"li",71),r(2),i()()),t&2){let e=l.$implicit;s(2),h(e)}}function gn(t,l){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i()()),t&2){let e=l.$implicit,o=l.$index;s(2),h(o+1),s(2),h(e.Key),s(2),h(e.Value)}}function Cn(t,l){if(t&1&&(n(0,"div",73)(1,"div",74),r(2),i()()),t&2){let e=l.$implicit,o=l.$index;s(),Ie(A(3,en,o/4>=1)),s(),y(" ",e.Model," ")}}function bn(t,l){if(t&1&&(n(0,"div",48)(1,"div",72),r(2),i(),n(3,"div",40)(4,"div",17),N(5,Cn,3,5,"div",73,R),i()()()),t&2){let e=l.$implicit;s(2),y(" ",e.Name," "),s(3),F(e.ListRole)}}function xn(t,l){if(t&1){let e=v();n(0,"button",76),C("click",function(){f(e);let a=d(3);return _(a.copyToClipboard())}),r(1," Copy to Clipboard "),i()}if(t&2){let e=d(3);u("matTooltip",e.tooltipText())("cdkCopyToClipboard",e.formData.ClientID)}}function hn(t,l){if(t&1){let e=v();n(0,"a",77),C("click",function(){f(e);let a=d(3);return _(a.preview("Profile/GenerateClientID"))}),r(1,"Generate"),i()}}function yn(t,l){if(t&1&&(n(0,"div",18)(1,"div",58),g(2,"input",59),i()()),t&2){let e=d(3);s(2),u("value",e.formData.ClientSecret)}}function vn(t,l){if(t&1){let e=v();n(0,"button",76),C("click",function(){f(e);let a=d(3);return _(a.copyToClipboard())}),r(1," Copy to Clipboard "),i()}if(t&2){let e=d(3);u("matTooltip",e.tooltipText())("cdkCopyToClipboard",e.formData.ClientSecret)}}function Sn(t,l){if(t&1){let e=v();n(0,"a",77),C("click",function(){f(e);let a=d(3);return _(a.preview("Profile/GenerateClientSecret"))}),r(1,"Generate"),i()}}function Mn(t,l){if(t&1&&(n(0,"div",55)(1,"h3"),r(2,"API Client ID"),i(),n(3,"small",75),r(4,"(developer.dealpos.com)"),i()(),n(5,"div",57)(6,"div",18)(7,"div",58),g(8,"input",59),i()(),n(9,"div",18)(10,"div",60),m(11,xn,2,2,"button",61),m(12,hn,2,0,"a",62),i()()(),n(13,"div",55)(14,"h3"),r(15,"API Client Secret"),i(),n(16,"small",75),r(17,"(developer.dealpos.com)"),i()(),n(18,"div",57),m(19,yn,3,1,"div",18),n(20,"div",18)(21,"div",60),m(22,vn,2,2,"button",61),m(23,Sn,2,0,"a",62),i()()()),t&2){let e=d(2);s(8),u("value",e.formData.ClientID),s(3),p(e.formData.ClientID?11:-1),s(),p(!(e.roleService==null||e.roleService.users==null)&&e.roleService.users.View||!(e.roleService==null||e.roleService.profile==null)&&e.roleService.profile.View?12:-1),s(7),p(e.formData.ClientSecret?19:-1),s(3),p(e.formData.ClientSecret?22:-1),s(),p(!(e.roleService==null||e.roleService.users==null)&&e.roleService.users.View||!(e.roleService==null||e.roleService.profile==null)&&e.roleService.profile.View?23:-1)}}function wn(t,l){t&1&&(n(0,"div",50)(1,"div",78)(2,"div",79),g(3,"i",80),i(),n(4,"h3",81),r(5," Role Required "),i(),n(6,"p",82),r(7," To view your Developer API Key and Secret for External Access "),i(),n(8,"p",83),r(9," Please ask your Administrator to assign the role [Developer - API] for your user "),i()()())}function Dn(t,l){if(t&1){let e=v();n(0,"button",76),C("click",function(){f(e);let a=d(2);return _(a.copyToClipboard())}),r(1," Copy to Clipboard "),i()}if(t&2){let e=d(2);u("matTooltip",e.tooltipText())("cdkCopyToClipboard",e.formData.OTTUrl)}}function Tn(t,l){if(t&1){let e=v();n(0,"a",77),C("click",function(){f(e);let a=d(2);return _(a.generateOTT("Profile/GenerateOneTimeToken"))}),r(1,"Generate"),i()}}function En(t,l){if(t&1){let e=v();n(0,"mainpanel-cmp",4)(1,"actions"),m(2,nn,1,1),i(),n(3,"content")(4,"div",5)(5,"div")(6,"ul",6)(7,"li",7)(8,"a",8),C("click",function(){f(e);let a=d();return _(a.onSelectTab("GENERAL"))}),r(9,"General"),i()(),n(10,"li",7)(11,"a",9),C("click",function(){f(e);let a=d();return _(a.onSelectTab("SECURITY"))}),r(12,"Outlet Access"),i()(),n(13,"li",7)(14,"a",10),C("click",function(){f(e);let a=d();return _(a.onSelectTab("ROLES"))}),r(15,"Roles"),i()(),n(16,"li",7)(17,"a",11),C("click",function(){f(e);let a=d();return _(a.onSelectTab("API"))}),r(18,"Developer API"),i()(),n(19,"li",7)(20,"a",12),C("click",function(){f(e);let a=d();return _(a.onSelectTab("TOTP"))}),r(21,"TOTP"),i()(),n(22,"li",7)(23,"a",13),C("click",function(){f(e);let a=d();return _(a.onSelectTab("OTT"))}),r(24,"One Time Token"),i()()(),n(25,"div",14)(26,"div",15)(27,"div",16)(28,"div",17)(29,"div",18)(30,"div",19)(31,"div",20)(32,"h2"),r(33,"General Credential"),i()(),n(34,"div",21)(35,"form",22,0)(37,"div",23)(38,"label",24),r(39," First Name "),i(),n(40,"input",25),w("ngModelChange",function(a){f(e);let c=d();return M(c.formData.FirstName,a)||(c.formData.FirstName=a),_(a)}),i()(),n(41,"div",23)(42,"label",26),r(43," Last Name "),i(),n(44,"input",27),w("ngModelChange",function(a){f(e);let c=d();return M(c.formData.LastName,a)||(c.formData.LastName=a),_(a)}),i()(),n(45,"div",23)(46,"label",28),r(47," Username "),i(),n(48,"input",29),w("ngModelChange",function(a){f(e);let c=d();return M(c.formData.LoginID,a)||(c.formData.LoginID=a),_(a)}),i()(),m(49,ln,6,8,"div",23),m(50,cn,6,3,"div",23),i()()()(),n(51,"div",18)(52,"div",19)(53,"div",20)(54,"h2"),r(55,"Change Password"),i(),n(56,"small",30),r(57,"Leave blank if you do not want to change"),i()(),n(58,"div",31)(59,"div",23)(60,"label",32),r(61,"Password"),i(),n(62,"p-password",33,1),w("ngModelChange",function(a){f(e);let c=d();return M(c.formData.NewPassword,a)||(c.formData.NewPassword=a),_(a)}),i(),m(64,mn,2,0,"i",34),i(),n(65,"div",23)(66,"label",32),r(67,"Re-Password"),i(),n(68,"p-password",35,2),w("ngModelChange",function(a){f(e);let c=d();return M(c.formData.RePassword,a)||(c.formData.RePassword=a),_(a)}),i(),m(70,pn,2,0,"i",34),i()()()()()()(),n(71,"div",36)(72,"div",37)(73,"div",38)(74,"h5",39),r(75,"Group"),i(),n(76,"i"),r(77,"Profile Groups"),i()(),n(78,"div",40)(79,"div",17),N(80,un,3,1,"ul",41,R),i()()(),n(82,"div",42)(83,"div",43)(84,"h5",39),r(85,"Outlets"),i(),n(86,"i"),r(87,"Profile Outlets"),i()(),n(88,"div",40)(89,"div",17)(90,"div")(91,"table",44)(92,"thead",45)(93,"tr")(94,"th"),r(95,"No"),i(),n(96,"th"),r(97,"Outlet"),i(),n(98,"th"),r(99,"Access"),i()()(),n(100,"tbody"),N(101,fn,7,3,"tr",null,R),i()()()()()()(),n(103,"div",46)(104,"div",37)(105,"div",38)(106,"h5",39),r(107,"Group"),i(),n(108,"i"),r(109,"Profile Groups"),i()(),n(110,"div",40)(111,"div",17),N(112,_n,3,1,"ul",41,R),i()()(),n(114,"div",42)(115,"div",43)(116,"h5",39),r(117,"Outlets"),i(),n(118,"i"),r(119,"Profile Outlets"),i()(),n(120,"div",40)(121,"div",17)(122,"div")(123,"table",44)(124,"thead",45)(125,"tr")(126,"th"),r(127,"No"),i(),n(128,"th"),r(129,"Outlet"),i(),n(130,"th"),r(131,"Access"),i()()(),n(132,"tbody"),N(133,gn,7,3,"tr",null,R),i()()()()()()(),n(135,"div",47),N(136,bn,7,1,"div",48,R),i(),n(138,"div",49),m(139,Mn,24,6)(140,wn,10,0,"div",50),i(),n(141,"div",51),g(142,"POS-setup-2FA",52),i(),n(143,"div",53)(144,"div",48)(145,"div",54)(146,"div",55)(147,"h3"),r(148,"One Time Token"),i(),n(149,"small",56),r(150,"*Token will expire in 1 hour"),i()(),n(151,"div",57)(152,"div",18)(153,"div",58),g(154,"input",59),i()(),n(155,"div",18)(156,"div",60),m(157,Dn,2,2,"button",61),m(158,Tn,2,0,"a",62),i()(),n(159,"div",54)(160,"small",63),r(161," Please refer this "),n(162,"a",64),r(163,"article"),i(),r(164," for more information "),i()()()()()()()()()()()}if(t&2){let e=X(63),o=X(69),a=d();u("pageData",a.menuData())("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p(a.activeTab()=="GENERAL"?2:-1),s(6),u("ngClass",A(32,Ut,a.activeTab()=="GENERAL")),s(3),u("ngClass",A(34,Ut,a.activeTab()=="SECURITY")),s(15),u("ngClass",A(36,Ut,a.activeTab()=="GENERAL")),s(14),S("ngModel",a.formData.FirstName),u("disabled",!(!(a.roleService==null||a.roleService.users==null)&&a.roleService.users.View||!(a.roleService==null||a.roleService.profile==null)&&a.roleService.profile.View)),s(4),S("ngModel",a.formData.LastName),u("disabled",!(!(a.roleService==null||a.roleService.users==null)&&a.roleService.users.View||!(a.roleService==null||a.roleService.profile==null)&&a.roleService.profile.View)),s(4),S("ngModel",a.formData.LoginID),u("disabled",!(!(a.roleService==null||a.roleService.users==null)&&a.roleService.users.View||!(a.roleService==null||a.roleService.profile==null)&&a.roleService.profile.View)),s(),p(a.data().EmailRequired?49:-1),s(),p(a.data().EmailRequired?-1:50),s(12),u("toggleMask",!0)("feedback",!1)("disabled",!(!(a.roleService==null||a.roleService.users==null)&&a.roleService.users.View||!(a.roleService==null||a.roleService.profile==null)&&a.roleService.profile.View)),S("ngModel",a.formData.NewPassword),u("ngClass",A(38,Hi,e.touched&&e.invalid)),s(2),p((e.touched||o.dirty)&&e.invalid?64:-1),s(4),S("ngModel",a.formData.RePassword),u("toggleMask",!0)("feedback",!1)("disabled",!(!(a.roleService==null||a.roleService.users==null)&&a.roleService.users.View||!(a.roleService==null||a.roleService.profile==null)&&a.roleService.profile.View))("ngClass",A(40,Hi,a.formData.NewPassword!=a.formData.RePassword&&(o.touched||o.dirty))),s(2),p(a.formData.NewPassword!=a.formData.RePassword&&(o.touched||o.dirty)?70:-1),s(10),F(a.data().Security.Groups),s(21),F(a.data().Security.Outlets),s(11),F(a.data().Security.Groups),s(21),F(a.data().Security.Outlets),s(3),F(a.data().Role),s(3),p(!(a.roleService==null||a.roleService.developer==null)&&a.roleService.developer.Api?139:140),s(3),u("totpEnabled",a.totpEnabled()),s(12),u("value",a.formData.OneTimeToken),s(3),p(a.formData.OneTimeToken?157:-1),s(),p(!(a.roleService==null||a.roleService.users==null)&&a.roleService.users.View||!(a.roleService==null||a.roleService.profile==null)&&a.roleService.profile.View?158:-1)}}var ht=class t extends Ri{constructor(e,o,a,c,I,K,be){super(e,o,"Profile/MyProfileFormInitial",a);this.toastr=c;this.dialog=I;this.authenticatorService=K;this.roleService=be}toastr;dialog;authenticatorService;roleService;tooltipText=E("Copy to Clipboard");totpEnabled=E(!1);activeTab=E("GENERAL");postBindForm(e){this.totpEnabled.set(e?.Form?.TOTPEnabled),this.data().Form.OTTUrl=window.location.hostname+`?OTT=${e?.Form?.OneTimeToken}`}validate(){if(this.formData.NewPassword!=this.formData.RePassword){this.toastr.error("Password and re-enter password must be equal.",L.Error);return}this.onSubmit("Profile/SubmitProfile")}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",L.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:o=>{this.data().Form=o},error:o=>{this.toastr.error(o,L.Error)}})}copyToClipboard(){this.tooltipText.set("Token has been copied to clipboard"),setTimeout(()=>{this.tooltipText.set("Copy to Clipboard")},2e3)}onSelectTab(e){this.activeTab.set(e)}generateOTT(e){this.httpService.post(`/API/${e}`).subscribe({next:o=>{this.data().Form.OneTimeToken=o.OneTimeToken,this.data().Form.OTTUrl="https://"+window.location.hostname+`?OTT=${this.data().Form.OneTimeToken}`},error:o=>{this.toastr.error(o,L.Error)}})}static \u0275fac=function(o){return new(o||t)(x(ge),x(P),x(st),x(Q),x(ae),x(ft),x(ut))};static \u0275cmp=T({type:t,selectors:[["POS-my-profile"]],standalone:!1,features:[ue],decls:1,vars:1,consts:[["validation","ngForm"],["password","ngModel"],["rePassword","ngModel"],["email","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-5"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item","cursor"],["id","general-tab","data-bs-toggle","tab","href","#general","role","tab","aria-controls","general","aria-selected","false",1,"nav-link","active",3,"click","ngClass"],["id","security-tab","data-bs-toggle","tab","href","#security","role","tab","aria-controls","profile","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","roles-tab","data-bs-toggle","tab","href","#roles","role","tab","aria-controls","contact","aria-selected","false",1,"nav-link",3,"click"],["id","developerApi-tab","data-bs-toggle","tab","href","#developerApi","role","tab","aria-controls","developerApi","aria-selected","false",1,"nav-link",3,"click"],["id","setupAuth-tab","data-bs-toggle","tab","href","#setupAuth","role","tab","aria-controls","setupAuth","aria-selected","false",1,"nav-link",3,"click"],["id","ott-tab","data-bs-toggle","tab","href","#ott","role","tab","aria-controls","ott","aria-selected","false",1,"nav-link",3,"click"],["id","myTabContent",1,"tab-content"],["id","general","role","tab",1,"tab-pane","fade","show","active","mt-0","pt-8","border","border-top-0",3,"ngClass"],[1,"container"],[1,"row"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"d-flex","flex-column","row-gap-4"],[1,"d-flex","flex-column","row-gap-2"],["for","inputFirstName",1,"text-muted"],["type","text","id","inputFirstName","name","firstName","placeholder","First Name",1,"form-control","custom",3,"ngModelChange","ngModel","disabled"],["for","inputLastName",1,"text-muted"],["type","text","id","inputLastName","name","lastName","placeholder","Last Name",1,"form-control","custom",3,"ngModelChange","ngModel","disabled"],["for","inputName",1,"text-muted"],["type","text","id","inputName","name","userName","placeholder","Username","readonly","",1,"form-control","custom",3,"ngModelChange","ngModel","disabled"],[1,"text-body-secondary","h6"],[1,"card-body","d-flex","flex-column","row-gap-4"],["for","password",1,"text-muted"],["required","",1,"p-change-password",3,"ngModelChange","toggleMask","feedback","disabled","ngModel","ngClass"],[1,"control-label","text-danger"],[1,"p-change-password",3,"ngModelChange","ngModel","toggleMask","feedback","disabled","ngClass"],["id","security","role","tab",1,"tab-pane","fade","show","border","border-top-0","mt-0"],[1,"border-bottom","row","pt-8","ms-3","me-3"],[1,"col-sm-2","mt-3"],[1,"fw-bold"],[1,"col-sm-10"],[1,"mb-4"],[1,"row","border-bottom","mt-10","ms-3"],[1,"col-sm-2"],[1,"table"],[1,"thead-light","sticky-top-thead"],["id","security","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],["id","roles","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],[1,"row","pt-8","ms-3","me-3"],["id","developerApi","role","tab",1,"tab-pane","fade","show","border","border-top-0","p-5","mt-0"],["id","no-customer-info",1,"mt-8"],["id","setupAuth","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[3,"totpEnabled"],["id","ott","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[1,"col-12"],[1,"d-flex","align-items-center"],[1,"text-danger","ms-5"],[1,"row","d-flex","align-items-center"],[1,"form-floating-outline","bg-light-gray"],["type","text","name","api-client","readonly","",1,"form-control",3,"value"],[1,"form-floating-outline"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm"],[1,"text-body-secondary","fst-italic","h6","ms-2"],["href","https://support.dealpos.com/en/articles/9890206-one-time-token","target","_blank"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"disabled"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"click","disabled"],["for","email",1,"text-muted"],["type","text","id","email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","",1,"form-control","custom",3,"ngModelChange","ngModel","disabled"],[1,"text-danger"],["id","email","type","Email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$",1,"form-control","custom",3,"ngModelChange","disabled","ngModel"],[2,"list-style","circle"],[1,"col-sm-2","border","fw-bold","p-3","text-center",2,"background-color","#f6f6f6"],[1,"col-md-3","px-0"],[1,"p-3","border","border-start-0"],[1,"text-body-secondary","h6","ms-2"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"click","matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm",3,"click"],[1,"paylater-warning-box"],[1,"paylater-warning-icon-bg"],[1,"fas","fa-exclamation-triangle","paylater-warning-icon"],["id","customer-required-title",1,"paylater-warning-title"],["id","customer-required-msg",1,"paylater-warning-msg"],[1,"paylater-warning-desc"]],template:function(o,a){o&1&&m(0,En,165,42,"mainpanel-cmp",4),o&2&&p(a.data()&&a.formData?0:-1)},dependencies:[ye,Se,Y,B,ve,ct,mt,W,Ve,re,Me,Vi,We,Li],styles:["p-password.p-change-password>div.p-password.p-component.p-inputwrapper{width:100%!important} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>input{width:100%!important;height:58px!important;padding-left:15px!important;border:1px solid #dee2e6} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>eyeicon.p-element.p-icon-wrapper{margin-right:10px}.custom[_ngcontent-%COMP%]{border-radius:4px;padding:10px 12px;min-height:36px;line-height:1.5;background-color:#fff}.p-change-password[_ngcontent-%COMP%]{border-radius:4px;min-height:40px;line-height:1.5;background-color:#fff}.paylater-warning-box[_ngcontent-%COMP%]{background:#fffbeb;border:2px solid #fde68a;border-radius:18px;padding:1.8rem 1.2rem 1.2rem;text-align:center;margin:.5rem auto;color:#a16207;box-sizing:border-box}.paylater-warning-icon-bg[_ngcontent-%COMP%]{background:#fef3c7;border-radius:50%;width:90px;height:90px;display:flex;align-items:center;justify-content:center;margin:0 auto 1.5rem}.paylater-warning-icon[_ngcontent-%COMP%]{font-size:2.5rem;color:#d97706}.paylater-warning-title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700;margin-bottom:.7rem;color:#b45309;font-family:inherit}.paylater-warning-msg[_ngcontent-%COMP%]{font-size:1rem;color:#b45309;margin-bottom:.2rem}.paylater-warning-desc[_ngcontent-%COMP%]{font-size:.875rem;color:#ca8a04}"]})};var In=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],On=t=>({ID:t});function Nn(t,l){if(t&1){let e=v();n(0,"div",18)(1,"h6"),r(2,"Type"),i(),n(3,"ng-select",19),w("ngModelChange",function(a){f(e);let c=d(2);return M(c.pageData().Filter.TypeID,a)||(c.pageData().Filter.TypeID=a),_(a)}),i(),n(4,"h6"),r(5,"Customer"),i(),n(6,"autocompleteV2",20),C("onInputChange",function(a){f(e);let c=d(2);return _(c.resetCustomer(a))})("onSelect",function(a){f(e);let c=d(2);return _(c.onSelectCustomer(a))}),i(),n(7,"h6"),r(8,"From"),i(),n(9,"datepicker",21),w("dateChange",function(a){f(e);let c=d(2);return M(c.pageData().Filter.From,a)||(c.pageData().Filter.From=a),_(a)}),i(),n(10,"h6"),r(11,"To"),i(),n(12,"datepicker",22),w("dateChange",function(a){f(e);let c=d(2);return M(c.pageData().Filter.To,a)||(c.pageData().Filter.To=a),_(a)}),i()()}if(t&2){let e=d(2);s(3),u("items",e.pageData().Options.Types),S("ngModel",e.pageData().Filter.TypeID),s(6),S("date",e.pageData().Filter.From),s(3),S("date",e.pageData().Filter.To)}}function Fn(t,l){if(t&1){let e=v();n(0,"a",23),C("click",function(){f(e);let a=d(2);return _(a.openExportModal())}),g(1,"i",24),r(2," Export "),i()}}function kn(t,l){t&1&&(n(0,"th",11),r(1," @@ Cost "),i())}function Vn(t,l){if(t&1&&(n(0,"span",32),r(1),b(2,"amountFraction"),i()),t&2){let e=d().$implicit;s(),h(" - Profit: "+D(2,1,e.Profit))}}function An(t,l){if(t&1&&(n(0,"small"),r(1),i()),t&2){let e=d(2).$implicit;s(),y("( ",e.Commissions[0].Quantity," unit )")}}function Rn(t,l){if(t&1&&(n(0,"i",45),r(1),m(2,An,2,1,"small"),i()),t&2){let e=d().$implicit;s(),y("sold by ",e.Commissions[0].SalesName," "),s(),p(e.Commissions[0].Quantity<e.Quantity?2:-1)}}function Bn(t,l){if(t&1&&(n(0,"li")(1,"i"),r(2),i()()),t&2){let e=l.$implicit;s(2),y("( ",e.Quantity+" unit by "+e.SalesName," )")}}function Ln(t,l){if(t&1&&(n(0,"ul",46)(1,"li")(2,"i"),r(3,"sold by"),i()(),N(4,Bn,3,1,"li",null,R),i()),t&2){let e=d().$implicit;s(4),F(e.Commissions)}}function Wn(t,l){if(t&1&&(n(0,"th",51),r(1),b(2,"amountFraction"),i()),t&2){let e=d().$implicit;s(),y(" ",D(2,1,e.UnitCost)," ")}}function Hn(t,l){if(t&1&&(n(0,"tr",40)(1,"th",42)(2,"div",43)(3,"span",44),r(4),i(),m(5,Rn,3,2,"i",45),m(6,Ln,6,0,"ul",46),g(7,"span",47),b(8,"newlines"),i()(),n(9,"th",48),r(10),i(),n(11,"th",49),r(12),b(13,"quantityFraction"),i(),n(14,"th",50),r(15),i(),m(16,Wn,3,3,"th",51),n(17,"th",52),r(18),b(19,"amountFraction"),i(),n(20,"th",53),r(21),i(),n(22,"th",54),r(23),b(24,"amountFraction"),i()()),t&2){let e=l.$implicit,o=d(3);s(4),h(e.Name),s(),p(e.Commissions.length==1?5:-1),s(),p(e.Commissions.length>1?6:-1),s(),u("innerHTML",D(8,11,e.Note),q),s(3),y(" ",e.Code," "),s(2),y(" ",D(13,13,e.Quantity)," "),s(3),y(" ",e.UOMName," "),s(),p(!(o.roleService==null||o.roleService.product==null)&&o.roleService.product.Cost?16:-1),s(2),y(" ",D(19,15,e.UnitPrice)," "),s(3),y(" ",e.Discount==0?"":e.Discount+"%"," "),s(2),y(" ",D(24,17,e.Total)," ")}}function jn(t,l){if(t&1&&(n(0,"tr")(1,"th",55),r(2),i(),n(3,"th",56),r(4),i(),n(5,"th",57),r(6),b(7,"amountFraction"),i()()),t&2){let e=l.$implicit;s(2),y("",e.Label," :"),s(2),y(" ",e.CurrencySymbol," "),s(2),y(" ",D(7,3,e.Amount)," ")}}function Un(t,l){if(t&1&&(n(0,"div")(1,"div",25)(2,"div",26)(3,"a",27),g(4,"span",28),b(5,"date"),g(6,"small",29),b(7,"date"),i(),n(8,"span"),r(9),b(10,"showIfNotNullOrEmptyString"),i(),g(11,"span",30),n(12,"strong",31),r(13),b(14,"sum"),n(15,"span"),r(16),b(17,"showIfNotNullOrEmptyString"),i()(),m(18,Vn,3,3,"span",32),n(19,"i",33),r(20),i(),n(21,"span",34),r(22),i(),n(23,"span",35),r(24),i()(),n(25,"div",36),g(26,"label",37),i()(),n(27,"table",38)(28,"tbody",39),N(29,Hn,25,19,"tr",40,R),i()(),n(31,"table",41),N(32,jn,8,5,"tr",null,R),i()()),t&2){let e=l.$implicit,o=d(2);s(3),u("routerLink",ai(27,In))("queryParams",A(28,On,e.ID)),s(),u("innerHTML",e.EntityName+" #"+e.Number+" - "+O(5,12,e.Date,"dd MMM yyyy"),q),s(2),u("innerHTML","("+O(7,15,e.Created,"HH:mm")+")",q),s(3),h(O(10,18,e.CustomerNameDisplay," - {0}")),s(4),y(" ","[Q: "+O(14,21,e.Items,"Quantity")+"]"," "),s(3),h(O(17,24,e.SalesName," - Sales: {0}")),s(2),p(!(o.roleService==null||o.roleService.report==null)&&o.roleService.report.Profit?18:-1),s(2),h(e.DeliveryOutlet==null?"":": Delivered from "+e.DeliveryOutlet),s(2),h(e.PromotionCoupon==null?"":": "+e.PromotionCoupon),s(2),h(e.SONote==null?"":": "+e.SONote),s(2),u("innerHTML",e.PaymentStateLabel,q),s(3),F(e.Items),s(3),F(e.Aggregate)}}function zn(t,l){if(t&1){let e=v();n(0,"mainpanel-cmp",2),C("onSubmit",function(){f(e);let a=d();return _(a.searchFromPageOne())}),n(1,"filters"),ot(2,Nn,13,4,"ng-template",null,0,si),i(),n(4,"actions"),m(5,Fn,3,0,"a",3),i(),n(6,"content")(7,"div",4)(8,"table",5)(9,"thead",6)(10,"tr")(11,"th",7),r(12,"Name"),i(),n(13,"th",8),r(14,"Code"),i(),n(15,"th",9),r(16,"Qty"),i(),n(17,"th",10),r(18,"UOM"),i(),m(19,kn,2,0,"th",11),n(20,"th",12),r(21,"@@ Price"),i(),n(22,"th",13),r(23,"%"),i(),n(24,"th",14),r(25,"Total"),i()()()(),N(26,Un,34,30,"div",null,R),n(28,"div",15)(29,"button",16),C("click",function(){f(e);let a=d();return _(a.showSummaryReport())}),r(30," View Report Summary "),i()(),n(31,"POS-complex-pagination",17),C("jumpToPage",function(){f(e);let a=d();return _(a.getListData())})("previousPage",function(){f(e);let a=d();return _(a.getListData())})("nextPage",function(){f(e);let a=d();return _(a.getListData())}),i()()()()}if(t&2){let e,o=d();u("pageData",o.menuData())("hideSearchBox",!0)("isFilterOnDropdown",!1),s(5),p(!(o.roleService==null||o.roleService.global==null)&&o.roleService.global.Export?5:-1),s(14),p(!(o.roleService==null||o.roleService.product==null)&&o.roleService.product.Cost?19:-1),s(7),F(o.data().Data),s(5),u("total",((e=o.data())==null||e.Data==null?null:e.Data.length)??0)("pageData",o.pageData())}}var vt=class t extends Re{constructor(e,o,a){super(e,o,"Report/MySales","ReportLoader/MyActivity");this.roleService=a}roleService;dialog=H(ae);onSelectCustomer(e){this.pageData().Filter.CustomerID=e}resetCustomer(e){e==""&&(this.pageData().Filter.CustomerID=null)}showSummaryReport(){this.dialog.open(Fi,{data:{Filter:this.pageData().Filter}})}openExportModal(){this.dialog.open(hi,{data:{title:"My Sales",exportTypes:[{ID:"ReportExport/MySales",Value:"Default",FileName:"My Sales"}],filterExport:this.pageData().Filter,getAllDataLengthAPI:"ReportExport/MySales/Count",pagination:!0}})}static \u0275fac=function(o){return new(o||t)(x(ge),x(P),x(ut))};static \u0275cmp=T({type:t,selectors:[["POS-my-sales"]],standalone:!1,features:[ue],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"btn","btn-outline-secondary"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","660px"],[2,"width","68px"],[1,"text-end",2,"width","30px"],[2,"width","50px"],["id","thCost",1,"text-end",2,"width","80px"],[1,"text-end",2,"width","80px"],[1,"red",2,"width","30px"],[1,"text-end",2,"width","90px"],[1,"text-center"],["role","button",1,"btn","btn-outline-primary",3,"click"],["api","Report/ReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"onInputChange","onSelect"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block","mt-8","mb-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4",3,"innerHTML"],[1,"fst-italic","fw-bold",3,"innerHTML"],[1,"d-block"],[1,"text-danger","ms-3"],[1,"fw-bold"],["id","deliveryNote"],[1,"d-inline-block","fst-italic"],[1,"d-inline-block"],[1,"d-lg-block","mt-8","me-2","fw-bold","fst-italic"],[1,"status",3,"innerHTML"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"border-start","border-end"],[1,"table","table-sm","table-borderless"],[2,"width","645px"],[1,"lh-base"],[1,"fw-normal"],[1,"text-warning","inlineMarginLeft"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"d-block","fw-normal","fst-italic",3,"innerHTML"],[1,"fw-normal",2,"width","75px"],[1,"fw-normal","text-end",2,"width","42px"],[1,"fst-italic","small",2,"width","52px"],[1,"fw-normal","text-end",2,"width","80px"],[1,"fw-normal","text-end",2,"width","92px"],[1,"fw-normal","text-end","text-danger",2,"width","30px"],[1,"fw-normal","text-end",2,"width","102px"],[1,"text-end"],[1,"p-0","fw-normal","text-end",2,"width","1%"],[1,"fw-normal","text-end",2,"width","5%"]],template:function(o,a){o&1&&m(0,zn,32,7,"mainpanel-cmp",1),o&2&&p(a.data()?0:-1)},dependencies:[B,W,dt,re,Te,De,Oi,Ei,j,Si,Mi,wi,yi,vi],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{line-height:13px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:20px!important}"],changeDetection:0})};function qn(t,l){t&1&&(n(0,"small",15),r(1,"*Enter a valid phone number"),i())}function $n(t,l){if(t&1&&m(0,qn,2,0,"small",15),t&2){d();let e=X(9);p(e.errors!=null&&e.errors.pattern?0:-1)}}function Gn(t,l){t&1&&(n(0,"small",15),r(1,"*Enter a valid email address"),i())}function Qn(t,l){if(t&1&&m(0,Gn,2,0,"small",15),t&2){d();let e=X(16);p(e.errors!=null&&e.errors.pattern?0:-1)}}var St=class t{constructor(l,e,o,a,c){this.httpService=l;this.dialogRef=e;this.data=o;this.toastr=a;this.router=c;this.config.title="Subscribe Account Info",this.config.okText="I want to subscribe",this.config.cancelText="Cancel",this.config.customWidth="35vw"}httpService;dialogRef;data;toastr;router;config=new ee;onOk(l){if(l!=="Enter"){if(this.data.form.Qty==0){this.toastr.error("The number of outlets can't be empty",L.Error),this.dialogRef.close();return}this.httpService.post("/API/Subscription/SendSubscription",this.data.form).subscribe(e=>{this.toastr.success(e,L.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}static \u0275fac=function(e){return new(e||t)(x(P),x(oe),x(we),x(Q),x(ke))};static \u0275cmp=T({type:t,selectors:[["POS-modal-subscribe"]],standalone:!1,decls:26,vars:7,consts:[["validation","ngForm"],["phoneCtrl","ngModel"],["emailCtrl","ngModel"],[3,"onOk","onCancel","onClose","dynamicValidated","config"],[1,"container"],[1,"row"],[1,"col-6"],[1,"form-floating-outline"],["type","text","id","inputPhone","placeholder","Phone","name","phone","pattern","[0-9]{0,15}","required","","matTooltipPosition","above","matTooltip","Your number will be saved to help our customer service quickly identify you in the future",1,"form-control",3,"ngModelChange","ngModel"],["for","inputPhone"],["type","text","id","inputEmail","placeholder","Email","name","email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","","matTooltipPosition","above","matTooltip","Your monthly recurring invoice will be sent to the email you specified above",1,"form-control",3,"ngModelChange","ngModel"],["for","inputEmail"],[1,"col-12"],["name","note","id","inputNote","placeholder","Note","rows","6",1,"form-control",3,"ngModelChange","ngModel"],["for","inputNote"],[1,"text-danger"]],template:function(e,o){if(e&1){let a=v();n(0,"modal-material",3),C("onOk",function(I){return o.onOk(I)})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"div",4)(3,"form",null,0)(5,"div",5)(6,"div",6)(7,"div",7)(8,"input",8,1),w("ngModelChange",function(I){return f(a),M(o.data.form.Phone,I)||(o.data.form.Phone=I),_(I)}),i(),n(10,"label",9),r(11,"Phone*"),i(),m(12,$n,1,1),i()(),n(13,"div",6)(14,"div",7)(15,"input",10,2),w("ngModelChange",function(I){return f(a),M(o.data.form.Email,I)||(o.data.form.Email=I),_(I)}),i(),n(17,"label",11),r(18,"Email*"),i(),m(19,Qn,1,1),i()()(),n(20,"div",5)(21,"div",12)(22,"div",7)(23,"textarea",13),w("ngModelChange",function(I){return f(a),M(o.data.form.Note,I)||(o.data.form.Note=I),_(I)}),i(),n(24,"label",14),r(25,"Note"),i()()()()()()()()}if(e&2){let a=X(9),c=X(16);u("dynamicValidated",(a==null?null:a.valid)||(c==null?null:c.valid))("config",o.config),s(8),S("ngModel",o.data.form.Phone),s(4),p(a.touched&&a.dirty?12:-1),s(3),S("ngModel",o.data.form.Email),s(4),p(c.touched&&c.dirty?19:-1),s(4),S("ngModel",o.data.form.Note)}},dependencies:[Se,Y,B,ve,ct,mt,W,Ve,Z,Me],encapsulation:2})};function Yn(t,l){if(t&1){let e=v();n(0,"div",20),C("click",function(){let a=f(e).$implicit,c=d(2);return _(c.onCycleChange(a.key))}),n(1,"div",21)(2,"span",22),r(3),i(),g(4,"div",23),i()()}if(t&2){let e=l.$implicit,o=d(2);Ie(e.key==o.formData.Cycle?"active":""),s(3),h(e.dicount),s(),u("innerHTML",e.desc,q)}}function Kn(t,l){if(t&1){let e=v();n(0,"tr")(1,"th",24),r(2,"Register"),i(),n(3,"td"),r(4,":"),i(),n(5,"td")(6,"input",25),w("ngModelChange",function(a){f(e);let c=d(2);return M(c.formData.Register,a)||(c.formData.Register=a),_(a)}),C("ngModelChange",function(){f(e);let a=d(2);return _(a.onQtyRegisterChange())}),i(),n(7,"span"),r(8),b(9,"number"),i()()()}if(t&2){let e=d(2);s(6),u("preventNegative",!0),S("ngModel",e.formData.Register),s(2),y("/ ",D(9,3,e.data.Options.Register))}}function Zn(t,l){if(t&1){let e=v();n(0,"div",6)(1,"div",26)(2,"div",8)(3,"h2",9),r(4,"Setup Fee "),i(),n(5,"small",10),r(6,"(One-time payment)"),i()()(),n(7,"div",19)(8,"table",27)(9,"tr")(10,"th"),r(11,"POS"),i(),n(12,"td"),r(13,"\xA0:"),i(),n(14,"td")(15,"label",28)(16,"radio-options",29),w("modelChange",function(a){f(e);let c=d(2);return M(c.data.Options.SetupFee,a)||(c.data.Options.SetupFee=a),_(a)}),C("modelChange",function(){f(e);let a=d(2);return _(a.calculateSetupFee())}),i()()()()()()()}if(t&2){let e=d(2);s(16),S("model",e.data.Options.SetupFee)}}function Jn(t,l){t&1&&r(0," s ")}function Xn(t,l){if(t&1&&(n(0,"tr")(1,"td")(2,"strong"),r(3,"Additional Register"),i(),n(4,"p")(5,"small",37),r(6),i()()(),n(7,"td",32),r(8),i(),n(9,"td",33),g(10,"span",36),r(11),b(12,"number"),i(),n(13,"td",34),r(14),i(),n(15,"td",33),g(16,"span",36),r(17),b(18,"number"),i()()),t&2){let e=d(4);s(6),Oe("",e.formData.Register," Register",e.formData.Register>1?"s":""," "),s(2),h(e.formData.Cycle),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),s(),h(D(12,8,e.data.Options.Register)),s(3),y(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),s(),h(D(18,10,e.registerFee))}}function eo(t,l){if(t&1&&(n(0,"tr")(1,"td")(2,"strong")(3,"span"),r(4,"POS"),i()(),n(5,"p")(6,"small",37),r(7," - Consultation "),g(8,"br"),r(9," - Training 2x "),g(10,"br"),r(11," - 1 Month Support Group"),i()()(),g(12,"td",32),n(13,"td",33)(14,"span"),r(15,"IDR "),i(),r(16),b(17,"number"),i(),g(18,"td",34),n(19,"td",33)(20,"span"),r(21,"IDR "),i(),r(22),b(23,"number"),i()()),t&2){let e=d(4);s(16),h(D(17,2,e.formData.Setup)),s(6),h(D(23,4,e.formData.Setup))}}function to(t,l){if(t&1&&(n(0,"tr")(1,"td")(2,"strong"),g(3,"span",36),i(),n(4,"p")(5,"small",37),r(6),m(7,Jn,1,0),i()()(),n(8,"td",32),r(9),i(),n(10,"td",33),g(11,"span",36),r(12),b(13,"number"),i(),n(14,"td",34),r(15),i(),n(16,"td",33),g(17,"span",36),r(18),b(19,"number"),i()(),m(20,Xn,19,12,"tr"),m(21,eo,24,6,"tr")),t&2){let e=d(3);s(3),u("innerHTML",e.formData.Type==1?"Starter Subscription":"Standard Subscription",q),s(3),y(" ",e.formData.Qty," Outlet"),s(),p(e.formData.Qty>1?7:-1),s(2),h(e.formData.Cycle),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),s(),h(D(13,11,e.data.Options.Type)),s(3),y(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),s(),h(D(19,13,e.outletFee)),s(2),p(e.formData.Register>0?20:-1),s(),p(e.data.Options.SetupFee?21:-1)}}function io(t,l){if(t&1&&(n(0,"tr")(1,"th"),r(2,"Sub Total"),i(),n(3,"td",39),r(4,":"),i(),n(5,"td",33)(6,"strong"),g(7,"span",36),r(8),b(9,"number"),i()()()),t&2){let e=d(4);s(7),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),s(),h(D(9,2,e.subTotal))}}function no(t,l){if(t&1&&(n(0,"tr")(1,"th"),r(2,"Tax (11%)"),i(),n(3,"td",39),r(4,":"),i(),n(5,"td",33)(6,"strong"),g(7,"span",36),r(8),b(9,"number"),i()()()),t&2){let e=d(4);s(7),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),s(),h(D(9,2,e.subTotal*.11))}}function oo(t,l){if(t&1&&(n(0,"div",35)(1,"table",38),m(2,io,10,4,"tr"),m(3,no,10,4,"tr"),n(4,"tr")(5,"th"),r(6,"Total"),i(),n(7,"td",39),r(8,":"),i(),n(9,"td",33)(10,"strong"),g(11,"span",36),r(12),b(13,"number"),i()()()()()),t&2){let e=d(3);s(2),p(e.data.vatEnabled?2:-1),s(),p(e.data.vatEnabled?3:-1),s(8),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),s(),y("",D(13,4,e.subTotal+(e.data.vatEnabled?e.subTotal*.11:0))," ")}}function ao(t,l){if(t&1&&(n(0,"div",19)(1,"table",30)(2,"thead",31)(3,"tr")(4,"th"),r(5,"Product"),i(),n(6,"th",32),r(7,"Month"),i(),n(8,"th",33),r(9,"Price"),i(),n(10,"th",34),r(11,"Disc"),i(),n(12,"th",33),r(13,"Total"),i()()(),n(14,"tbody"),m(15,to,22,15),i()(),m(16,oo,14,6,"div",35),i()),t&2){let e=d(2);s(15),p((e.formData==null?null:e.formData.Qty)>0?15:-1),s(),p((e.formData==null?null:e.formData.Qty)>0?16:-1)}}function ro(t,l){t&1&&(n(0,"div",6)(1,"div",26)(2,"h2"),r(3,'Your payment currency is "IDR"'),i()(),n(4,"div",19)(5,"div",40)(6,"div",41)(7,"h2",42)(8,"button",43),r(9," I Want to pay in USD "),i()(),n(10,"div",44)(11,"div",45)(12,"ol",46)(13,"li",47),r(14," Go to setup menu"),i(),n(15,"li",47),r(16," Click tab currency"),i(),n(17,"li",47),r(18," Select the currency you want to make for payment"),i(),n(19,"li",47),r(20," Select Yes at primary currency box and click save"),i(),n(21,"li",48),r(22," Then you can check to my subscribe again "),i()(),n(23,"p",49),r(24,"For more detailed information, please check the following article: "),n(25,"a",50),r(26,"Added Currency Conversion"),i()()()()()()()())}function lo(t,l){if(t&1){let e=v();n(0,"mainpanel-cmp",1)(1,"actions")(2,"button",2),C("click",function(){f(e);let a=d();return _(a.onOpenSubscribeDialog())}),r(3,"Subscribe Now"),i()(),n(4,"content")(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"h2",9),r(12,"Subscribe "),i(),n(13,"small",10),r(14,"(Recurring)"),i()(),n(15,"a",11),C("click",function(){f(e);let a=d();return _(a.showRegister=!a.showRegister)}),r(16,"More"),i()(),n(17,"div",12)(18,"table",13)(19,"tr")(20,"th"),r(21,"Outlets"),i(),n(22,"td"),r(23,":"),i(),n(24,"td")(25,"input",14,0),w("ngModelChange",function(a){f(e);let c=d();return M(c.formData.Qty,a)||(c.formData.Qty=a),_(a)}),C("ngModelChange",function(){f(e);let a=d();return _(a.onQtyOutletChange())}),i(),n(27,"span"),r(28),b(29,"number"),i()()(),n(30,"tr")(31,"th"),r(32,"Cycle"),i(),n(33,"td"),r(34,":"),i(),n(35,"td"),N(36,Yn,5,4,"div",15,R),i()(),m(38,Kn,10,5,"tr"),i()()(),m(39,Zn,17,1,"div",6),i(),n(40,"div",16)(41,"div",6)(42,"div",17),C("click",function(){f(e);let a=d();return _(a.invoice=!a.invoice)}),n(43,"h2",18),r(44,"Invoice Preview"),i()(),m(45,ao,17,2,"div",19),i(),m(46,ro,27,0,"div",6),i()()()()()}if(t&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("hideMenu",!0),s(2),u("disabled",e.formData.Qty==0),s(23),u("preventNegative",!0),S("ngModel",e.formData.Qty),s(3),y("/ ",D(29,12,e.data.Type[0].amount)),s(8),F(e.data.DiscountOptions),s(2),p(e.showRegister?38:-1),s(),p(e.data.Options.Setup?39:-1),s(6),p(e.invoice?45:-1),s(),p(e.data.Options.Setup?46:-1)}}var Mt=class t extends Bi{constructor(e,o,a,c){super(e,o,"Subscription/MySubscriptionLoader",a);this.matDialog=c}matDialog;showRegister=!1;invoice=!0;outletFee=0;registerFee=0;subTotal=0;postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(St,{data:{form:this.formData}})}onCycleChange(e){switch(this.formData.Cycle=e,e){case 3:this.formData.Discount=0;break;case 6:this.formData.Discount=10;break;case 12:this.formData.Discount=15;break}this.calculateregisterFee(),this.calculate()}onQtyOutletChange(){this.calculate()}calculate(){if(this.formData.Cycle>1){let e=this.data.Options.Type*this.formData.Qty*this.formData.Cycle;this.data.Discount=e*this.formData.Discount/100,this.outletFee=this.data.Options.Type*this.formData.Qty*this.formData.Cycle-this.data.Discount,this.subTotal=this.outletFee+this.registerFee}else this.outletFee=this.data.Options.Type*this.formData.Qty,this.subTotal=this.outletFee+this.registerFee,this.data.Discount=0;this.data.Options.SetupFee&&(this.subTotal=this.subTotal+this.formData.Setup)}calculateSetupFee(){this.data.Options.SetupFee?(this.formData.SetupFee=!0,this.subTotal=this.subTotal+this.formData.Setup):(this.formData.SetupFee=!1,this.subTotal=this.subTotal-this.formData.Setup)}onQtyRegisterChange(){this.calculateregisterFee(),this.calculate()}calculateregisterFee(){let e=this.data.Options.Register*this.formData.Cycle*this.formData.Register;if(this.formData.Discount>0){let o=e*this.formData.Discount/100;this.registerFee=e-o}else this.registerFee=e}static \u0275fac=function(o){return new(o||t)(x(ge),x(P),x(st),x(ae))};static \u0275cmp=T({type:t,selectors:[["POS-choose-plan"]],standalone:!1,features:[ue],decls:1,vars:1,consts:[["outletQty","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu"],[1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","bg-light-gray","pb-10"],[1,"row","pt-5"],[1,"col-md-5","m-0","pe-0","pt-0","pb-0"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"card-body",2,"padding-right","0.625rem"],[1,"table-sm"],["type","text","autoNum","",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"class"],[1,"col-md-7"],[1,"card-header",3,"click"],[1,"title"],[1,"card-body"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"click"],[1,"card-body","text-center",2,"cursor","pointer","width","80px","padding","10px 5px"],[1,"fw-bold"],[1,"fw-normal","border-top","border-dark",3,"innerHTML"],["matTooltipPosition","above","matTooltip","Additional Register"],["type","text","autoNum","","maxlength","3",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card-header"],[1,"form-horizontal"],[1,"form-check","form-check-inline",2,"cursor","pointer","padding-top","8px"],["name","POS",3,"modelChange","model"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"min-width","65px"],[1,"text-end"],[1,"text-end",2,"min-width","85px"],[1,"d-flex","justify-content-end"],[3,"innerHTML"],[2,"font-size","90% !important"],[1,"table-sm","table-borderless","me-3"],[1,"sep"],["id","accordionExample",1,"accordion"],[1,"accordion-item"],["id","panelsStayOpen-headingTwo",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#panelsStayOpen-collapseTwo","aria-expanded","false","aria-controls","panelsStayOpen-collapseTwo",1,"accordion-button","collapsed"],["id","panelsStayOpen-collapseTwo","aria-labelledby","panelsStayOpen-headingTwo",1,"accordion-collapse","collapse"],[1,"accordion-body","pt-2"],[1,"list-group","list-group-numbered","mt-5","mb-3"],[1,"list-group-item","mb-3","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"list-group-item","rounded-0","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"ms-2","mt-6"],["href","https://support.dealpos.com/en/articles/8956190-how-to-create-new-currency","target","_blank"]],template:function(o,a){o&1&&m(0,lo,47,14,"mainpanel-cmp",1),o&2&&p(a.data&&a.formData?0:-1)},dependencies:[Y,B,gi,W,re,xi,bt,Me,fe],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})};function so(t,l){t&1&&(n(0,"div",10)(1,"h5",12),g(2,"i",13),r(3," You are not listening to any outlet. Please select one. "),i()())}function co(t,l){if(t&1&&(n(0,"div",11)(1,"h5",12),g(2,"i",13),r(3),i()()),t&2){let e,o=d(2);s(3),y(" You are currently listening to ",(e=o.selectedOutlet())==null?null:e.Name,". ")}}function mo(t,l){if(t&1&&(n(0,"div",2)(1,"div",9),m(2,so,4,0,"div",10),m(3,co,4,1,"div",11),i()()),t&2){let e=d();s(2),p(e.selectedOutlet()?-1:2),s(),p(e.selectedOutlet()?3:-1)}}var He=class t{constructor(l,e,o,a){this.signalrClientService=l;this.httpService=e;this.dialogRef=o;this.toastr=a;this.modalConfig.set(new ee),this.modalConfig().title="Subscribe Notification",this.modalConfig().customWidth="475px",this.initModalLoader(),this.touchOnSelectOption.set(!1)}signalrClientService;httpService;dialogRef;toastr;modalConfig=E(new ee);entities=E([]);outletID=G("");selectedOutlet=E(null);initialOutlet=E(null);touchOnSelectOption=E(!1);previousSelectedOutlet=E(null);initModalLoader(){this.httpService.post("/api/NotificationLoader/PushNotificationList").pipe(de(l=>$.IsNotEmpty(l))).subscribe(l=>{this.entities.set(l.Options.Entities),$.IsNotEmpty(l.SubscribeOn)&&this.outletID.set(l.SubscribeOn),this.initSelectedOutlet()})}initSelectedOutlet(){let{ID:l,Name:e}=this.findOutletByID(this.outletID())||{ID:"",Name:""},o={ID:l,Name:e};this.selectedOutlet.set(o),this.previousSelectedOutlet.set(this.selectedOutlet()),this.initialOutlet.set(this.selectedOutlet()),this.checkValidateButtonOk()}checkValidateButtonOk(){this.modalConfig().validated=!0,$.IsEmpty(this.selectedOutlet())&&(this.modalConfig().validated=!1)}onSelectOutlet(l){this.previousSelectedOutlet.set(this.selectedOutlet()),this.selectedOutlet.set(l),this.modalConfig().validated=!0}onOpenSelectOutlet(){this.touchOnSelectOption.set(!0)}onCancel(){this.dialogRef.close()}onOk(){let l=this.initialOutlet()?this.initialOutlet().ID:null;this.outletID()!==l?$.IsNotEmpty(this.outletID())?this.subscribeToPushNotification(`Listening to ${this.selectedOutlet()?.Name}`,"Push Notification Enabled"):this.unsubscribeToPushNotification():this.dialogRef.close()}unsubscribeToPushNotification(){this.subscribeToPushNotification(`You are no longer listening to ${this.previousSelectedOutlet()?.Name}`,"Push Notification Disabled"),this.setLocalStorage(!0)}subscribeToPushNotification(l,e){let o=localStorage.getItem("PushNotificationID")||"",a={EntityID:this.outletID()};this.httpService.post("/api/PushNotification/Subscribe",a).subscribe(c=>{this.signalrClientService.SubscribeGroup(this.outletID()?this.outletID():"",o),this.setLocalStorage(),this.toastr.success(l,e),this.dialogRef.close()})}setLocalStorage(l=!1){l?localStorage.removeItem("NotificationOutletID"):localStorage.setItem("NotificationOutletID",this.outletID())}findOutletByID(l){return this.entities().find(o=>o.ID==l)}static \u0275fac=function(e){return new(e||t)(x(ui),x(P),x(oe),x(Q))};static \u0275cmp=T({type:t,selectors:[["POS-modal-subscribe-notification"]],inputs:{outletID:[1,"outletID"]},outputs:{outletID:"outletIDChange"},decls:11,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container"],[1,"row"],[1,"row","mt-1"],[1,"col-md-2"],[1,"pt-10"],[1,"col-md-10"],[1,"form-floating-outline","selected"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Options","id","outlet",1,"productform",3,"open","clear","ngModelChange","change","items","ngModel"],[1,"col-12"],[1,"alert","alert-danger"],[1,"alert","alert-success"],[1,"d-flex"],["aria-hidden","true",1,"fa-solid","fa-circle-info","me-3","mt-1"]],template:function(e,o){e&1&&(n(0,"modal-material",0),C("onOk",function(){return o.onOk()})("onCancel",function(){return o.onCancel()})("onClose",function(){return o.onCancel()}),n(1,"content")(2,"div",1),m(3,mo,4,2,"div",2),n(4,"div",3)(5,"div",4)(6,"h5",5),r(7,"Outlet"),i()(),n(8,"div",6)(9,"div",7)(10,"ng-select",8),C("open",function(){return o.onOpenSelectOutlet()})("clear",function(){return o.onOpenSelectOutlet()}),w("ngModelChange",function(c){return M(o.outletID,c)||(o.outletID=c),c}),C("change",function(c){return o.onSelectOutlet(c)}),i()()()()()()()),e&2&&(u("config",o.modalConfig()),s(3),p(o.touchOnSelectOption()?-1:3),s(7),u("items",o.entities()),S("ngModel",o.outletID))},dependencies:[Z,Ct,De,ne,B,W],encapsulation:2})};var uo=t=>({ID:t});function fo(t,l){if(t&1&&(n(0,"a",15),r(1),i()),t&2){let e=d().$implicit;u("routerLink","/menu"+e.URL)("queryParams",A(3,uo,e.ObjectID)),s(),y(" ",e.Body," ")}}function _o(t,l){if(t&1&&(n(0,"a",16),r(1),i()),t&2){let e=d().$implicit;u("href",ii(e.URL),Ne),s(),y(" ",e.Body," ")}}function go(t,l){if(t&1&&(n(0,"tr",13)(1,"td"),r(2),i(),n(3,"td")(4,"b"),r(5),i(),g(6,"br"),n(7,"span"),m(8,fo,2,5,"a",15),m(9,_o,2,3,"a",16),i()(),n(10,"td"),r(11),b(12,"date"),i(),n(13,"td"),r(14),i()()),t&2){let e=l.$implicit;s(2),h(e.OutletName),s(3),h(e.Header),s(3),p(e.ObjectIDType>0?8:-1),s(),p(e.ObjectIDType==0?9:-1),s(2),h(O(12,6,e.Created,"dd MMM yyyy HH:mm")),s(3),h(e.TypeString)}}function Co(t,l){if(t&1){let e=v();n(0,"mat-paginator",17),C("page",function(a){f(e);let c=d(2);return _(c.onPaginationChange(a))}),i()}if(t&2){let e=d(2);u("length",e.pagination.listTotal())("pageSize",e.pagination.pageSize())("pageIndex",e.pageData().Filter.PageNumber==0?0:e.pageData().Filter.PageNumber-1)}}function bo(t,l){if(t&1){let e=v();n(0,"mainpanel-cmp",1),C("onSubmit",function(){f(e);let a=d();return _(a.searchFromPageOne())}),n(1,"actions")(2,"a",2),C("click",function(){f(e);let a=d();return _(a.openSubscribeModal())}),r(3," Subscribe "),i()(),n(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),r(9,"Outlet"),i(),n(10,"ng-select",5),w("ngModelChange",function(a){f(e);let c=d();return M(c.pageData().Filter.ListIDs,a)||(c.pageData().Filter.ListIDs=a),_(a)}),i()(),n(11,"div")(12,"h6"),r(13,"From"),i(),n(14,"datepicker",6),w("dateChange",function(a){f(e);let c=d();return M(c.pageData().Filter.From,a)||(c.pageData().Filter.From=a),_(a)}),i()(),n(15,"div")(16,"h6"),r(17,"To"),i(),n(18,"datepicker",7),w("dateChange",function(a){f(e);let c=d();return M(c.pageData().Filter.To,a)||(c.pageData().Filter.To=a),_(a)}),i()()()()(),n(19,"content")(20,"div",8)(21,"table",9)(22,"thead",10)(23,"tr",11)(24,"th",12),r(25,"Outlet"),i(),n(26,"th"),r(27,"Message"),i(),n(28,"th"),r(29,"Created"),i(),n(30,"th"),r(31,"Type"),i()()(),n(32,"tbody"),N(33,go,15,9,"tr",13,R),i()(),n(35,"div"),m(36,Co,1,3,"mat-paginator",14),i()()()()}if(t&2){let e=d();u("pageData",e.menuData())("hideSearchBox",!0),s(10),u("items",e.pageData().Options.Entities),S("ngModel",e.pageData().Filter.ListIDs),u("multiple",!0),s(4),S("date",e.pageData().Filter.From),s(4),S("date",e.pageData().Filter.To),s(15),F(e.data().Data),s(3),p(e.pagination.listTotal()>0?36:-1)}}var je=class t extends Re{constructor(e,o,a){super(e,o,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList");this.dialog=a}dialog;preInitList(){let e=new Date;e.setHours(0,0,0,0);let o=new Date;o.setHours(23,59,59,59),this.pageData().Filter.From=e,this.pageData().Filter.To=o}openSubscribeModal(){this.dialog.open(He)}static \u0275fac=function(o){return new(o||t)(x(ge),x(P),x(ae))};static \u0275cmp=T({type:t,selectors:[["POS-notification"]],features:[ue],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],["role","button",1,"btn","btn-success",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel","multiple"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","200px"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],[3,"page","length","pageSize","pageIndex"]],template:function(o,a){o&1&&m(0,bo,37,8,"mainpanel-cmp",0),o&2&&p(a.data()?0:-1)},dependencies:[Be,re,Ct,De,ne,B,W,_e,pt,Te,dt,Ae,gt,j],encapsulation:2})};var le=class t{_loadSubscriptionData=new Xe(null);loadSubscriptionData$=this._loadSubscriptionData.asObservable();subscriptionData$;lastUnpaidInvoiceDate$;constructor(l){this.subscriptionData$=this.loadSubscriptionData$.pipe(J(()=>l.get("/API/Subscription/GetInitialData").pipe(tt(e=>{let o=0;e.Subscription?.SubscriptionState=="Overdue"?o=1:e.Subscription?.SubscriptionState=="Sell Only"?o=2:e.Subscription?.SubscriptionState=="Suspended"&&(o=3),$.IsNotEmpty(e.Subscription)&&(e.Subscription.SubscriptionStatus=o)}))),et(1)),this.lastUnpaidInvoiceDate$=this.subscriptionData$.pipe(se(e=>e.invoices.filter(o=>(o.status=="sent"||o.status=="overdue")&&o.currency_code=="IDR")),se(e=>e.length>0?e[0].date:"-"))}loadSubscriptionData(){this._loadSubscriptionData.next()}static \u0275fac=function(e){return new(e||t)(ie(P))};static \u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ue=class t{constructor(l,e){l.subscriptionData$.pipe(de(a=>a.code!=200),J(()=>$t(e.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"])))).subscribe()}static \u0275fac=function(e){return new(e||t)(ie(le),ie(ke))};static \u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})};var Pe=class t{outlets$;from$;to$;_isLoadOutlet=new Xe(!1);isLoadOutlet$=this._isLoadOutlet.asObservable().pipe(de(l=>l));showLoadButton$;constructor(l,e){let o=this.isLoadOutlet$.pipe(J(()=>l.post("/API/Subscription/GetUsage").pipe()),et(1));this.outlets$=o.pipe(se(a=>a.Outlets)),this.from$=o.pipe(se(a=>a.From)),this.to$=o.pipe(se(a=>a.To)),e.subscriptionData$.pipe(de(a=>a.Subscription?.OutletCount<=Qe.outletMaximumSubscription),tt(()=>this.loadOutlet())).subscribe(),this.showLoadButton$=Gt(e.subscriptionData$.pipe(se(a=>a.Subscription?.OutletCount>Qe.outletMaximumSubscription),Qt(1)),o.pipe(se(()=>!1)))}loadOutlet(){this._isLoadOutlet.next(!0)}static \u0275fac=function(e){return new(e||t)(ie(P),ie(le))};static \u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})};var Dt=class t{apiUrl="https://app.midtrans.com/snap/snap.js";injected=!1;initScript(){return new Je(l=>{let e;this.injected||(e=document.createElement("script"),e.src=this.apiUrl,e.async=!0,e.setAttribute("data-client-key",Qe.midtransClientKey),this.injected=!0,document.body.appendChild(e))})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})};var yo=t=>({"text-decoration":t});function vo(t,l){if(t&1&&(n(0,"span",12),r(1),b(2,"number"),i()),t&2){let e=d().$implicit;s(),y(" "," - "+D(2,1,e.Discount)+"%"," ")}}function So(t,l){if(t&1&&(g(0,"i",15),b(1,"date")),t&2){let e=d().$implicit;u("matTooltip",ni("Next Recurring : ",O(1,2,e.NextRecurring,"dd MMM yyyy")))}}function Mo(t,l){if(t&1&&(n(0,"tr")(1,"td")(2,"div",8),r(3),i()(),n(4,"td")(5,"div",9)(6,"div",10)(7,"span",11),r(8),b(9,"number"),i(),m(10,vo,3,3,"span",12),i(),n(11,"span"),r(12),b(13,"number"),b(14,"number"),i(),n(15,"span")(16,"strong"),r(17),b(18,"number"),i()()()(),n(19,"td")(20,"div",13)(21,"small"),r(22),b(23,"date"),i(),ot(24,So,2,5,"i",14),i()()()),t&2){let e=l.$implicit,o=d();s(3),y(" ",e.TypeLabel," "),s(4),Fe("text-danger",e.Discount>0),u("ngStyle",A(25,yo,e.Discount>0?"line-through":"none")),s(),Oe(" ",o.currency(),"\xA0",D(9,14,e.Price)," "),s(2),p(e.Discount>0?10:-1),s(2),Ge(" ",o.currency(),"\xA0",D(13,16,e.Price-e.Price*e.Discount/100)," x ",D(14,18,e.RecurringFrequency)," months "),s(5),Oe(" ",o.currency(),"\xA0",D(18,20,e.NetRecurringAmount)," "),s(5),y(" ",O(23,22,e.RecurringStartOn,"dd MMM yyyy")," "),s(2),u("ngIf",e.NextRecurring)}}var ze=class t{addons=V([]);currency=V("IDR");static \u0275fac=function(e){return new(e||t)};static \u0275cmp=T({type:t,selectors:[["POS-addons-card"]],inputs:{addons:[1,"addons"],currency:[1,"currency"]},decls:19,vars:0,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"card-body"],[1,"table-responsive"],[1,"table","table-bordered"],[1,"thead-light"],[1,"text-end"],[2,"width","120px"],[1,"d-flex","flex-column"],[1,"d-flex","flex-column","text-end"],[1,"d-flex","text-end","justify-content-end"],[3,"ngStyle"],[1,"ms-2"],[1,"d-flex","align-items-center","gap-1"],["class","fas fa-info-circle text-muted","style","font-size: 12px; cursor: help","matTooltipPosition","above","matTooltipClass","custom-tooltip",3,"matTooltip",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","custom-tooltip",1,"fas","fa-info-circle","text-muted",2,"font-size","12px","cursor","help",3,"matTooltip"]],template:function(e,o){e&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),r(4,"AddOns"),i()()(),n(5,"div",2)(6,"div",3)(7,"table",4)(8,"thead",5)(9,"tr")(10,"th"),r(11,"App"),i(),n(12,"th",6),r(13,"Price"),i(),n(14,"th",7),r(15,"Since"),i()()(),n(16,"tbody"),N(17,Mo,25,27,"tr",null,at),i()()()()()),e&2&&(s(17),F(o.addons()))},dependencies:[_e,di,ci,_t,Me,fe,j],styles:[".custom-tooltip[_ngcontent-%COMP%]{background-color:#333;color:#fff;font-size:12px;padding:6px 10px;border-radius:4px;white-space:nowrap}"],changeDetection:0})};var Tt=class t{constructor(l,e,o){this.http=l;this.ngZone=e;this.toastr=o}http;ngZone;toastr;payInvoice(l,e,o,a){let c={InvNumber:l.invoice_number,GrossAmount:l.balance,WHTPercentage:e,VATEnabled:o,InvoiceID:l.invoice_id,CustomerID:l.customer_id};return this.http.post("/API/Subscription/GetSNAPToken",c).pipe(J(I=>this.openSNAPDialog(I,a)))}payAllInvoices(l,e,o,a){let c=0,I,K,be,me;l.forEach(z=>{(z.status=="sent"||z.status=="overdue")&&(c+=z.total,K==null?(I=z.invoice_number,K=z.invoice_number.concat("$"+z.total+";"),be=z.invoice_id,me=z.invoice_id.concat("$"+z.total+";")):(I=I.concat("_"+z.invoice_number),K=K.concat(z.invoice_number.concat("$"+z.total+";")),be=be.concat(";"+z.invoice_id),me=me.concat(z.invoice_id.concat("$"+z.total)+";")))});let $e={CustomerID:l[0].customer_id,InvNumber:K,OrderID:I,GrossAmount:c,WHTPercentage:e,VATEnabled:o,InvoiceID:me};return this.http.post("/API/Subscription/GetSNAPTokenMultipleInvoice",$e).pipe(J(z=>this.openSNAPDialog(z,a)))}openSNAPDialog(l,e){let o=e;return new Je(a=>{snap.pay(l.token,{onSuccess:()=>{this.ngZone.run(()=>{this.showToaster(o),a.next(),a.complete()})}})})}showToaster(l){let e="Payment Successful!";l>1&&(e+=`
|
|
3
3
|
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(e,L.Success)}static \u0275fac=function(e){return new(e||t)(ie(P),ie(Zt),ie(Q))};static \u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})};var To=t=>({"background-color":t}),Eo=(t,l)=>({"justify-content-between":t,"justify-content-center":l}),Po=(t,l,e,o,a)=>({"bg-success":t,"bg-warning text-dark":l,"bg-danger":e,"bg-secondary":o,"text-white":a});function Io(t,l){if(t&1){let e=v();n(0,"button",10),C("click",function(){f(e);let a=d();return _(a.payAllInvoices())}),r(1),b(2,"number"),i()}if(t&2){let e=d();s(),y(" PAY ALL - ",e.currency()+" "+D(2,1,e.totalPayable())," ")}}function Oo(t,l){if(t&1&&(n(0,"a",16),r(1),i()),t&2){let e=d().$implicit;u("href",e.invoice_url,Ne),s(),h(e.invoice_number)}}function No(t,l){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=d().$implicit;s(),h(e.invoice_number)}}function Fo(t,l){if(t&1&&(n(0,"div",17)(1,"small"),r(2),i()()),t&2){let e=d().$implicit;u("ngClass",ri(2,Po,e.status==="paid",e.status==="void",e.status==="overdue",e.status!=="paid"&&e.status!=="void"&&e.status!=="sent"&&e.status!=="overdue",e.status==="draft")),s(2),h(e.status)}}function ko(t,l){if(t&1){let e=v();n(0,"button",22),C("click",function(){f(e);let a=d().$implicit,c=d();return _(c.payInvoice(a))}),r(1," Pay "),i()}}function Vo(t,l){if(t&1&&(n(0,"div",11)(1,"div",12)(2,"div",13)(3,"div",14)(4,"h3",15),m(5,Oo,2,2,"a",16)(6,No,2,1,"span"),i(),m(7,Fo,3,8,"div",17),i(),n(8,"small",5),r(9),b(10,"date"),i(),n(11,"small",18),r(12),b(13,"date"),i()(),n(14,"div",19)(15,"span",20),r(16),b(17,"number"),i(),m(18,ko,2,0,"button",21),i()()()),t&2){let e=l.$implicit,o=d();ei(A(18,To,e.status=="overdue"?"#f2dede":"")),s(5),p(e.invoice_url?5:6),s(2),p(e.status!=="sent"?7:-1),s(2),y(" Invoice Date: ",O(10,10,e.date,"dd MMM yyyy")," "),s(3),y(" Due Date: ",O(13,13,e.date,"dd MMM yyyy")," "),s(2),u("ngClass",rt(20,Eo,e.status==="sent"||e.status==="overdue",e.status!=="sent"&&e.status!=="overdue")),s(2),Oe(" ",o.currency()," ",D(17,16,e.total)," "),s(2),p(e.status==="sent"||e.status==="overdue"?18:-1)}}var Et=class t{constructor(l,e,o){this.payment=l;this.subscription=e;this.router=o}payment;subscription;router;invoices=V([]);WHTPercentage=V(0);VATEnabled=V(!1);subscriptionStatus=V(0);currency=V("");payableInvoices=lt(()=>this.invoices().filter(l=>l.status=="sent"||l.status=="overdue"&&l.currency_code=="IDR"));showPayAll=lt(()=>this.payableInvoices().length>1);totalPayable=lt(()=>this.payableInvoices().reduce((l,e)=>l+e.total,0));payAllInvoices(){this.payment.payAllInvoices(this.invoices(),this.WHTPercentage(),this.VATEnabled(),this.subscriptionStatus()).subscribe(()=>this.subscription.loadSubscriptionData())}payInvoice(l){this.currency()=="USD"?window.open(l.invoice_url,"_blank"):this.payment.payInvoice(l,this.WHTPercentage(),this.VATEnabled(),this.subscriptionStatus()).subscribe(()=>this.subscription.loadSubscriptionData())}static \u0275fac=function(e){return new(e||t)(x(Tt),x(le),x(ke))};static \u0275cmp=T({type:t,selectors:[["POS-invoices-card"]],inputs:{invoices:[1,"invoices"],WHTPercentage:[1,"WHTPercentage"],VATEnabled:[1,"VATEnabled"],subscriptionStatus:[1,"subscriptionStatus"],currency:[1,"currency"]},standalone:!1,decls:14,vars:3,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between",2,"padding-left","15px"],[1,"d-flex","align-items-center"],[1,"fa-solid","fa-file-invoice","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-primary","btn-pay"],[1,"card-body","px-0"],[1,"row","gx-0"],[1,"invoice-list","col-12",2,"padding","0px 15px",3,"style"],[1,"btn","btn-sm","btn-outline-primary","btn-pay",3,"click"],[1,"invoice-list","col-12",2,"padding","0px 15px"],[1,"py-10","border-top","d-flex","justify-content-between"],[1,"invoice-info"],[1,"d-flex","align-items-center","gap-4"],[1,"fw-normal"],["target","_blank",3,"href"],[1,"p-2","rounded","bg-danger","text-light","text-small",2,"font-size","11px","text-transform","uppercase",3,"ngClass"],[1,"sub-text"],[1,"invoice-payment","text-end","d-flex","flex-column",3,"ngClass"],[1,"d-block","invoice-total"],[1,"btn","btn-sm","btn-primary","btn-pay","text-uppercase","py-2"],[1,"btn","btn-sm","btn-primary","btn-pay","text-uppercase","py-2",3,"click"]],template:function(e,o){e&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),g(3,"i",3),n(4,"div")(5,"h3",4),r(6,"Invoices"),i(),n(7,"small",5),r(8,"Invoice are created for each subscription cycle."),i()()(),m(9,Io,3,3,"button",6),i(),n(10,"div",7)(11,"div",8),N(12,Vo,19,23,"div",9,R),i()()()),e&2&&(s(9),p(o.showPayAll()&&o.currency()!="USD"?9:-1),s(),Fe("pb-0",o.invoices.length==1),s(2),F(o.invoices()))},dependencies:[ye,fe,j],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-pay[_ngcontent-%COMP%]{min-width:140px}.invoice-total[_ngcontent-%COMP%]{font-size:14.5px}"],changeDetection:0})};var Pt=class t{subscribedSince=V();outlets=V();frequency=V();total=V();static \u0275fac=function(e){return new(e||t)};static \u0275cmp=T({type:t,selectors:[["POS-billing-info-card"]],inputs:{subscribedSince:[1,"subscribedSince"],outlets:[1,"outlets"],frequency:[1,"frequency"],total:[1,"total"]},standalone:!1,decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"card-body"],[1,"bill-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"]],template:function(e,o){e&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),r(4,"Billing Information"),i(),n(5,"small",2),r(6),b(7,"date"),i()()(),n(8,"div",3)(9,"div",4)(10,"div")(11,"h3",5),r(12),i(),n(13,"h5",6),r(14,"Outlet"),i()(),g(15,"div",7),n(16,"div")(17,"h3",5),r(18),i(),n(19,"h5",6),r(20,"Frequency"),i()(),g(21,"div",7),n(22,"div")(23,"h3",5),r(24),b(25,"number"),i(),n(26,"h5",6),r(27,"Amount"),i()()()()()),e&2&&(s(6),y("Subscribe Since: ",O(7,4,o.subscribedSince(),"dd MMM yyyy")),s(6),h(o.outlets()),s(6),y("",o.frequency()," Month"),s(6),h(D(25,7,o.total())))},dependencies:[fe,j],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media(max-width:576px){.bill-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}"],changeDetection:0})};var It=class t{constructor(l,e,o,a){this.httpService=l;this.dialogRef=e;this.data=o;this.toastr=a;this.config.title="Stop Subscription",this.config.customWidth="450px"}httpService;dialogRef;data;toastr;message="";config=new ee;onOk(){let l={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",L.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",l).subscribe(e=>{this.toastr.success(e.Message,L.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||t)(x(P),x(oe),x(we),x(Q))};static \u0275cmp=T({type:t,selectors:[["POS-modal-stop-subscription"]],standalone:!1,decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","200px",3,"ngModelChange","ngModel"],["for","message"]],template:function(e,o){e&1&&(n(0,"modal-material",0),C("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"div",1)(3,"textarea",2),w("ngModelChange",function(c){return M(o.message,c)||(o.message=c),c}),i(),n(4,"label",3),r(5,"Reason"),i()()()()),e&2&&(u("config",o.config),s(3),S("ngModel",o.message))},dependencies:[Y,B,W,Z],encapsulation:2})};var qt=t=>({"is-invalid":t});function Bo(t,l){t&1&&(n(0,"div",7),r(1,"Email is required."),i())}function Lo(t,l){t&1&&(n(0,"div",7),r(1,"Phone is required."),i())}function Wo(t,l){t&1&&g(0,"div",7)}var Ot=class t{constructor(l){this.dialogRef=l;this.config.update(e=>he(xe({},e),{title:"Update Billing Contact",customWidth:"500px"})),this.email.set(this.data.email),this.phone.set(this.data.phone),this.mobilePhone.set(this.data.mobilePhone)}dialogRef;email=E("");phone=E("");mobilePhone=E("");form;fb=H(Ci);data=H(we);config=E(new ee);generateForm(){this.form=this.fb.group({email:this.fb.control(null,[Wt.required]),phone:this.fb.control(null,[Wt.required]),mobilePhone:this.fb.control(null,[])})}ngOnInit(){this.generateForm(),this.form.patchValue({email:this.data.email,phone:this.data.phone,mobilePhone:this.data.mobilePhone})}ok(){let{email:l,phone:e,mobilePhone:o}=this.form.value;this.dialogRef.close({email:l,phone:e,mobilePhone:o})}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(x(oe))};static \u0275cmp=T({type:t,selectors:[["POS-dialog-update-billing"]],standalone:!1,decls:25,vars:15,consts:[[3,"onOk","onCancel","onClose","config","dynamicValidated"],[3,"formGroup"],[1,"mb-3","row"],["for","email",1,"col-4","fs-4"],[1,"text-danger","ms-2"],[1,"col"],["type","text","formControlName","email","id","email",1,"form-control","rounded",3,"ngClass"],["id","",1,"invalid-feedback"],["for","phone",1,"col-4","fs-4"],["formControlName","phone","type","text","id","phone",1,"form-control","rounded",3,"ngClass"],["for","mobilePhone",1,"col-4","fs-4"],["formControlName","mobilePhone","type","text","id","mobilePhone",1,"form-control","rounded",3,"ngClass"]],template:function(e,o){e&1&&(n(0,"modal-material",0),C("onOk",function(){return o.ok()})("onCancel",function(){return o.close()})("onClose",function(){return o.close()}),n(1,"content")(2,"form",1)(3,"div",2)(4,"label",3),r(5,"Email "),n(6,"sup",4),r(7,"*"),i()(),n(8,"div",5),g(9,"input",6),m(10,Bo,2,0,"div",7),i()(),n(11,"div",2)(12,"label",8),r(13,"Phone"),n(14,"sup",4),r(15,"*"),i()(),n(16,"div",5),g(17,"input",9),m(18,Lo,2,0,"div",7),i()(),n(19,"div",2)(20,"label",10),r(21,"Mobile Phone"),i(),n(22,"div",5),g(23,"input",11),m(24,Wo,1,0,"div",7),i()()()()()),e&2&&(u("config",o.config())("dynamicValidated",o.form.valid),s(2),u("formGroup",o.form),s(7),u("ngClass",A(9,qt,o.form.controls.email.invalid&&(o.form.controls.email.dirty||o.form.controls.email.touched))),s(),p(o.form.controls.email.errors!=null&&o.form.controls.email.errors.required?10:-1),s(7),u("ngClass",A(11,qt,o.form.controls.phone.invalid&&(o.form.controls.phone.dirty||o.form.controls.phone.touched))),s(),p(o.form.controls.phone.errors!=null&&o.form.controls.phone.errors.required?18:-1),s(5),u("ngClass",A(13,qt,o.form.controls.mobilePhone.invalid&&(o.form.controls.mobilePhone.dirty||o.form.controls.mobilePhone.touched))),s(),p(o.form.controls.mobilePhone.errors?24:-1))},dependencies:[ye,Se,Y,B,ve,_i,fi,Z],styles:["form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:2.5rem;border-radius:2px}form[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:invalid:focus, .form-control.is-invalid[_ngcontent-%COMP%]:focus{box-shadow:none}"]})};var Nt=class t{constructor(l){this.dialogRef=l;this.config.update(e=>he(xe({},e),{title:"Pause Subscription",customWidth:"480px"}))}dialogRef;data=H(we);httpService=H(P);toastr=H(Q);message=E("");month=E(1);config=E(new ee);onOk(){let l={Month:this.month(),Reason:this.message()};if(this.message().trim().length==0){this.toastr.error("The reason cannot be empty",L.Error);return}if(this.month()===0){this.toastr.error("Month must be bigger than zero",L.Error);return}this.httpService.post("/api/subscription/pause",l).subscribe(e=>{this.toastr.success(e.Message,L.Success),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||t)(x(oe))};static \u0275cmp=T({type:t,selectors:[["POS-dialog-pause-subscription"]],decls:15,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"],[1,"form-floating-outline","mt-5"],["type","text","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","message"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","220px",3,"ngModelChange","ngModel"]],template:function(e,o){e&1&&(n(0,"modal-material",0),C("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"h6",1),r(3," Your data will be retained but you will lose access until renewal is made "),i(),g(4,"br"),n(5,"h4",1),r(6," How long would you like to pause your subscription? "),i(),n(7,"div",2)(8,"input",3),w("ngModelChange",function(c){return M(o.month,c)||(o.month=c),c}),i(),n(9,"label",4),r(10,"Months"),i()(),n(11,"div",5)(12,"textarea",6),w("ngModelChange",function(c){return M(o.message,c)||(o.message=c),c}),i(),n(13,"label",4),r(14,"Reason"),i()()()()),e&2&&(u("config",o.config()),s(8),S("ngModel",o.month),s(4),S("ngModel",o.message))},dependencies:[_e,Z,ne,Y,B,W],encapsulation:2,changeDetection:0})};var Ft=class t{constructor(l,e,o){this.matDialog=l;this.http=e;this.toastr=o;Jt(()=>{this.updateBillingOnPageLoad()&&($.IsEmpty(this.email())||$.IsEmpty(this.phone()))&&this.updateBilling()})}matDialog;http;toastr;updateBillingOnPageLoad=V();lastUnpaidInvoiceDate=V();email=G();phone=G();mobilePhone=G();recurringStatus=G();cancel(){this.matDialog.open(It).afterClosed().subscribe()}pause(){this.matDialog.open(Nt).afterClosed().subscribe()}updateBilling(){this.matDialog.open(Ot,{data:{email:this.email(),phone:this.phone(),mobilePhone:this.mobilePhone()}}).afterClosed().pipe(de(l=>$.IsNotEmpty(l)),J(l=>this.http.post("/API/Subscription/UpdateBillingData",{Email:l.email,Phone:l.phone,Mobile:l.mobilePhone}).pipe(se(e=>he(xe({},l),{Message:e.Message}))))).subscribe(l=>{this.toastr.success(l.Message,L.Success),this.email.set(l.email),this.phone.set(l.phone),this.mobilePhone.set(l.mobilePhone)})}static \u0275fac=function(e){return new(e||t)(x(ae),x(P),x(Q))};static \u0275cmp=T({type:t,selectors:[["POS-renewal-card"]],inputs:{updateBillingOnPageLoad:[1,"updateBillingOnPageLoad"],lastUnpaidInvoiceDate:[1,"lastUnpaidInvoiceDate"],email:[1,"email"],phone:[1,"phone"],mobilePhone:[1,"mobilePhone"],recurringStatus:[1,"recurringStatus"]},outputs:{email:"emailChange",phone:"phoneChange",mobilePhone:"mobilePhoneChange",recurringStatus:"recurringStatusChange"},standalone:!1,decls:40,vars:16,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text","text-capitalize"],[1,"btn-group"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],[1,"dropdown-item",3,"click"],[1,"card-body"],[1,"renewal-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"text-center","invdate-container",2,"flex-grow","1"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"],[1,"d-flex","flex-column","ps-0","ps-sm-10","emwa-container",2,"flex-grow","2.5"],[1,"mt-sm-4","mt-8"]],template:function(e,o){e&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),r(4,"Renewal"),i(),n(5,"small",2),r(6),i()(),n(7,"div",3)(8,"button",4),g(9,"b",5),i(),n(10,"ul",6)(11,"li")(12,"a",7),C("click",function(){return o.updateBilling()}),r(13," Update Billing Contact "),i()(),n(14,"li")(15,"a",7),C("click",function(){return o.pause()}),r(16,"Pause Subscription"),i()(),n(17,"li")(18,"a",7),C("click",function(){return o.cancel()}),r(19,"Cancel Renewal"),i()()()()(),n(20,"div",8)(21,"div",9)(22,"div",10)(23,"h3",11),r(24),b(25,"date"),i(),n(26,"h5",12),r(27,"Invoice Date"),i()(),g(28,"div",13),n(29,"div",14)(30,"div")(31,"h3",11),r(32),i(),n(33,"h5",12),r(34,"Billing Email"),i()(),n(35,"div",15)(36,"h3",11),r(37),i(),n(38,"h5",12),r(39),i()()()()()()),e&2&&(s(5),Fe("text-success",o.recurringStatus()=="active")("text-danger",o.recurringStatus()=="stopped"),s(),h(o.recurringStatus()),s(18),y(" ",o.lastUnpaidInvoiceDate()=="-"?o.lastUnpaidInvoiceDate():O(25,13,o.lastUnpaidInvoiceDate(),"dd MMM yyyy")," "),s(8),h(o.email()??"-"),s(5),Ge(" ",o.phone()," ",o.phone()&&o.mobilePhone()?"/":""," ",o.mobilePhone()," "),s(2),Ge(" ",o.phone()?"Phone":""," ",o.phone()&&o.mobilePhone()?"/":""," ",o.mobilePhone()?"Mobile Phone":""," "))},dependencies:[j],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-cancel[_ngcontent-%COMP%]{width:140px}.renewal-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media(max-width:576px){.renewal-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}@media(max-width:576px){.invdate-container[_ngcontent-%COMP%], .emwa-container[_ngcontent-%COMP%]{flex-grow:0!important}}@media(max-width:576px){ #modal_material{width:100%!important}}"]})};var jo=t=>({"expanded-icon":t}),Uo=t=>({"bg-gradient-warning":t}),zo=t=>({"border-end":t});function qo(t,l){if(t&1&&(n(0,"small",5),r(1),b(2,"date"),b(3,"date"),i()),t&2){let e=d();s(),y(" (",O(2,1,e.lastMonthDate(),"dd MMM yyyy")+" - "+O(3,4,e.currentDate(),"dd MMM yyyy"),") ")}}function $o(t,l){if(t&1){let e=v();n(0,"button",12),C("click",function(){f(e);let a=d();return _(a.loadOutlet())}),r(1," Load "),i()}}function Go(t,l){if(t&1){let e=v();n(0,"button",12),C("click",function(){f(e);let a=d();return _(a.loadMinMax())}),r(1," Load Min Max Date "),i()}}function Qo(t,l){t&1&&(n(0,"th",11),r(1,"Min Date"),i())}function Yo(t,l){t&1&&(n(0,"th",11),r(1,"Max Date"),i())}function Ko(t,l){if(t&1&&(n(0,"td",17),r(1),b(2,"date"),i()),t&2){let e=d().$implicit;s(),h(O(2,1,e.MinDate,"dd MMM yyyy"))}}function Zo(t,l){if(t&1&&(n(0,"td",17),r(1),b(2,"date"),i()),t&2){let e=d().$implicit;s(),h(O(2,1,e.MaxDate,"dd MMM yyyy"))}}function Jo(t,l){if(t&1&&(n(0,"td",16),r(1),b(2,"date"),i()),t&2){let e=d().$implicit;s(),y(" ",O(2,1,e.MinDate,"dd MMM yyyy")," ")}}function Xo(t,l){if(t&1&&(n(0,"td",21),r(1),b(2,"date"),i()),t&2){let e=d().$implicit;s(),y(" ",O(2,1,e.MaxDate,"dd MMM yyyy")," ")}}function ea(t,l){if(t&1&&(n(0,"tr"),g(1,"td",18)(2,"td"),n(3,"td")(4,"ul",19)(5,"li")(6,"span"),r(7),i()()()(),n(8,"td",11),r(9),i(),g(10,"td",20),m(11,Jo,3,4,"td",16),m(12,Xo,3,4,"td",21),i()),t&2){let e=l.$implicit,o=d(3);s(7),y(" ",e.RegisterName," "),s(2),y(" ",e.OrdersCount," "),s(),u("ngClass",A(5,zo,!o.isLoadMinMaxDate())),s(),p(o.isLoadMinMaxDate()?11:-1),s(),p(o.isLoadMinMaxDate()?12:-1)}}function ta(t,l){if(t&1&&N(0,ea,13,7,"tr",null,at),t&2){let e=d().$implicit;F(e.Registers)}}function ia(t,l){if(t&1){let e=v();n(0,"tr",13)(1,"td")(2,"div",14),C("click",function(){let a=f(e).$implicit,c=d();return _(c.onExpandOutlet(a.EntityID))}),g(3,"i",15),i()(),n(4,"td"),r(5),i(),n(6,"td"),r(7),i(),n(8,"td",16),r(9),b(10,"number"),i(),n(11,"td",16),r(12),b(13,"number"),i(),m(14,Ko,3,4,"td",17),m(15,Zo,3,4,"td",17),i(),m(16,ta,2,0)}if(t&2){let e=l.$implicit,o=l.$index,a=d();s(3),u("ngClass",A(14,jo,a.expandedOutletID()===e.EntityID)),s(2),h(o+1),s(2),y(" ",e.Name," "),s(),Ie(A(16,Uo,(e==null?null:e.OrdersCount)<25||e.OrdersCount==null)),s(),y(" ",D(10,10,e.OrdersCount??0)," "),s(3),h(D(13,12,e.RegisterCount??1)),s(2),p(a.isLoadMinMaxDate()?14:-1),s(),p(a.isLoadMinMaxDate()?15:-1),s(),p(a.expandedOutletID()===e.EntityID?16:-1)}}var kt=class t{constructor(l,e){this.outletUsage=l;this.http=e}outletUsage;http;lastMonthDate=V();currentDate=V();outlets=V([]);showLoadButton=V();expandedOutletID=E(null);isLoadMinMaxDate=E(!1);outletsWithMinMax=E([]);mergeOutletWithMinMax=E([]);ngOnChanges(){this.isLoadMinMaxDate()||this.outletsWithMinMax.set(this.outlets())}loadOutlet(){this.outletUsage.loadOutlet()}loadMinMax(){this.http.post("/api/subscription/GetOutletWithMinMax").subscribe(l=>{this.mergeOutletWithMinMax.set(this.remapRegisters(this.outlets(),l.Outlets)),this.outletsWithMinMax.set(this.mergeOutletWithMinMax()),this.isLoadMinMaxDate.set(!0)})}remapRegisters(l,e){let o=e.reduce((a,c)=>(a[c.ID]=c,a),{});return l.map(a=>he(xe({},a),{Registers:a.Registers.map(c=>{let{MinDate:I=null,MaxDate:K=null}=o[c.RegisterID]??{};return he(xe({},c),{MinDate:I,MaxDate:K})})}))}onExpandOutlet(l){this.expandedOutletID.set(this.expandedOutletID()===l?null:l)}static \u0275fac=function(e){return new(e||t)(x(Pe),x(P))};static \u0275cmp=T({type:t,selectors:[["POS-outlet-card"]],inputs:{lastMonthDate:[1,"lastMonthDate"],currentDate:[1,"currentDate"],outlets:[1,"outlets"],showLoadButton:[1,"showLoadButton"]},standalone:!1,features:[Xt],decls:29,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-os-center","justify-content-between"],[1,"d-flex","align-items-center"],[1,"fa","fa-location-dot","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-secondary"],[1,"card-body","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],[1,"text-end",2,"width","120px"],[1,"btn","btn-sm","btn-outline-secondary",3,"click"],[1,"border"],["role","button",2,"cursor","pointer","width","fit-content",3,"click"],[1,"fa-regular","fa-chevron-right","text-dark",3,"ngClass"],[1,"text-end"],[1,""],[1,"border-start"],[1,"m-0"],[1,"border-end",3,"ngClass"],[1,"border-end","text-end"]],template:function(e,o){e&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),g(3,"i",3),n(4,"div")(5,"h3",4),r(6,"Outlets Usage"),i(),m(7,qo,4,7,"small",5),i()(),m(8,$o,2,0,"button",6),m(9,Go,2,0,"button",6),i(),n(10,"div",7)(11,"table",8)(12,"thead",9)(13,"tr"),g(14,"th",10),n(15,"th",10),r(16,"No"),i(),n(17,"th"),r(18,"Name"),i(),n(19,"th",11),r(20,"Orders"),i(),n(21,"th",11),r(22,"Registers"),i(),m(23,Qo,2,0,"th",11),m(24,Yo,2,0,"th",11),i()(),n(25,"tbody"),N(26,ia,17,18,null,null,R),b(28,"sortBy"),i()()()()),e&2&&(s(7),p(o.outlets!=null&&o.outlets.length?7:-1),s(),p(o.showLoadButton()?8:-1),s(),p(!o.showLoadButton()&&!o.isLoadMinMaxDate()?9:-1),s(14),p(o.isLoadMinMaxDate()?23:-1),s(),p(o.isLoadMinMaxDate()?24:-1),s(2),F(li(28,5,o.outletsWithMinMax(),"desc","OrdersCount")))},dependencies:[ye,fe,j,Di],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.bill-info[_ngcontent-%COMP%]{border:1px solid #e6e6e6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:16px}.expanded-icon[_ngcontent-%COMP%]{display:inline-block;transform:rotate(90deg);transition:transform .16s ease-in-out}"],changeDetection:0})};function oa(t,l){if(t&1){let e=v();n(0,"input",11),w("ngModelChange",function(a){f(e);let c=d();return M(c.nameForm,a)||(c.nameForm=a),_(a)}),i()}if(t&2){let e=d();S("ngModel",e.nameForm)}}function aa(t,l){if(t&1&&(n(0,"h4",8),r(1),i()),t&2){let e=d();s(),h(e.name()??"-")}}function ra(t,l){if(t&1){let e=v();n(0,"input",11),w("ngModelChange",function(a){f(e);let c=d();return M(c.npwpForm,a)||(c.npwpForm=a),_(a)}),i()}if(t&2){let e=d();S("ngModel",e.npwpForm)}}function la(t,l){if(t&1&&(n(0,"h4",8),r(1),i()),t&2){let e=d();s(),h(e.npwp()??"-")}}function sa(t,l){if(t&1){let e=v();n(0,"textarea",12),w("ngModelChange",function(a){f(e);let c=d();return M(c.addressForm,a)||(c.addressForm=a),_(a)}),i()}if(t&2){let e=d();S("ngModel",e.addressForm)}}function da(t,l){if(t&1&&(n(0,"h4",8),r(1),i()),t&2){let e=d();s(),y(" ",e.taxAddress()??"-"," ")}}function ca(t,l){if(t&1&&(n(0,"div",9)(1,"h4",6),r(2,"Document Link"),i(),n(3,"h4",8)(4,"a",13),r(5,"view"),i()()()),t&2){let e=d();s(4),u("href",e.documentLink(),Ne)}}function ma(t,l){if(t&1&&(n(0,"div",9)(1,"h4",6),r(2,"WHT"),i(),n(3,"h4",8),r(4),i()()),t&2){let e=d();s(4),y(" ",e.whtPercentage()??"-","% ")}}var Vt=class t{constructor(l){this.http=l}http;outletCount=V();name=G("");npwp=G("");documentLink=G("");whtPercentage=G(0);frequency=G(0);taxAddress=G("");isEdit=E(!1);nameForm=E("");npwpForm=E("");addressForm=E("");editData(){this.isEdit()?this.http.post("/API/Subscription/UpdateTaxInformation",{TaxID:this.npwpForm,TaxName:this.nameForm,TaxAddress:this.addressForm}).subscribe(()=>{this.isEdit.set(!1),this.name.set(this.nameForm()),this.npwp.set(this.npwpForm()),this.taxAddress.set(this.addressForm())}):(this.isEdit.set(!0),this.nameForm.set(this.name()),this.npwpForm.set(this.npwp()),this.addressForm.set(this.taxAddress()))}static \u0275fac=function(e){return new(e||t)(x(P))};static \u0275cmp=T({type:t,selectors:[["POS-tax-card"]],inputs:{outletCount:[1,"outletCount"],name:[1,"name"],npwp:[1,"npwp"],documentLink:[1,"documentLink"],whtPercentage:[1,"whtPercentage"],frequency:[1,"frequency"],taxAddress:[1,"taxAddress"]},outputs:{name:"nameChange",npwp:"npwpChange",documentLink:"documentLinkChange",whtPercentage:"whtPercentageChange",frequency:"frequencyChange",taxAddress:"taxAddressChange"},standalone:!1,decls:27,vars:6,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"btn","btn-sm","btn-outline-primary","btn-upgrade",3,"click"],[1,"card-body"],[1,"d-flex","justify-content-between"],[1,"fw-normal","title-form"],["type","text",1,"form-control",2,"width","250px",3,"ngModel"],[1,"text-secondary","fw-normal","user-info"],[1,"d-flex","justify-content-between","mt-8"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModel"],["type","text",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["target","_blank",3,"href"]],template:function(e,o){e&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),r(4,"Tax Information"),i(),n(5,"small",2),r(6,"PPN 11% + Tax Invoice"),i()(),n(7,"button",3),C("click",function(){return o.editData()}),r(8),i()(),n(9,"div",4)(10,"div",5)(11,"h4",6),r(12,"Full Name"),i(),m(13,oa,1,1,"input",7)(14,aa,2,1,"h4",8),i(),n(15,"div",9)(16,"h4",6),r(17,"NPWP"),i(),m(18,ra,1,1,"input",7)(19,la,2,1,"h4",8),i(),n(20,"div",9)(21,"h4",6),r(22,"Tax Address"),i(),m(23,sa,1,1,"textarea",10)(24,da,2,1,"h4",8),i(),m(25,ca,6,1,"div",9),m(26,ma,5,1,"div",9),i()()),e&2&&(s(8),y(" ",o.isEdit()?"Save":"Edit"," "),s(5),p(o.isEdit()?13:14),s(5),p(o.isEdit()?18:19),s(5),p(o.isEdit()?23:24),s(2),p(o.documentLink()?25:-1),s(),p(o.whtPercentage()?26:-1))},dependencies:[Y,B,W],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080}.user-info[_ngcontent-%COMP%]{max-width:50%}@media(max-width:576px){.title-form[_ngcontent-%COMP%]{flex-basis:100px;word-break:break-all}}"]})};function ua(t,l){if(t&1&&g(0,"POS-addons-card",10),t&2){let e=d();u("addons",e.AddOns)("currency",e.Subscription==null?null:e.Subscription.Currency)}}function fa(t,l){if(t&1&&g(0,"POS-tax-card",11),t&2){let e=d();u("name",e.Subscription==null?null:e.Subscription.TaxName)("npwp",e.Subscription==null?null:e.Subscription.TaxID)("outletCount",e.Subscription==null?null:e.Subscription.OutletCount)("documentLink",e.DocumentLink)("whtPercentage",e.WHTPercentage)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("taxAddress",e.Subscription==null?null:e.Subscription.TaxAddress)}}function _a(t,l){if(t&1&&(n(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"section",2)(4,"div",3)(5,"div",4),g(6,"POS-invoices-card",5),ti(7),b(8,"async"),g(9,"POS-outlet-card",6),b(10,"async"),b(11,"async"),b(12,"async"),i(),n(13,"div",7),g(14,"POS-billing-info-card",8)(15,"POS-renewal-card",9),m(16,ua,1,2,"POS-addons-card",10),m(17,fa,1,7,"POS-tax-card",11),i()()()()()()),t&2){let e=l,o=d();u("pageData",o.menuData())("hideSearchBox",!0)("hideSearchDropdown",!0),s(6),u("invoices",e.invoices)("WHTPercentage",e.WHTPercentage)("VATEnabled",e.VATEnabled)("subscriptionStatus",e.Subscription==null?null:e.Subscription.SubscriptionStatus)("currency",e.Subscription==null?null:e.Subscription.Currency);let a=D(8,24,o.outlets$);s(3),u("lastMonthDate",D(10,26,o.from$))("currentDate",D(11,28,o.to$))("outlets",a)("showLoadButton",D(12,30,o.showLoadButton$)),s(5),u("subscribedSince",e.Subscription==null?null:e.Subscription.Since)("outlets",e.Subscription==null?null:e.Subscription.OutletCount)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("total",e.Subscription==null?null:e.Subscription.TotalAmount),s(),u("updateBillingOnPageLoad",!(e.Subscription!=null&&e.Subscription.MobilePhone&&(e.Subscription!=null&&e.Subscription.Email)))("lastUnpaidInvoiceDate",e.Subscription==null?null:e.Subscription.NextRecurring)("email",e.Subscription==null?null:e.Subscription.Email)("phone",e.Subscription==null?null:e.Subscription.Phone)("mobilePhone",e.Subscription==null?null:e.Subscription.MobilePhone)("recurringStatus",e.Subscription==null?null:e.Subscription.RecurringStatus),s(),p(e.AddOns&&e.AddOns.length>0?16:-1),s(),p((e.Subscription==null?null:e.Subscription.Currency)!="USD"?17:-1)}}var At=class t{title=H(pi);menuData=E({H:"My Subscription",N:{SM:[]},T:"My Subscription",U:[]});outlets$;from$;to$;subscriptionData$;lastUnpaidInvoiceDate$;showLoadButton$;constructor(l,e,o,a){let I=this.title.getTitle().split("|")[0]+"| My Subscription";this.title.setTitle(I),this.subscriptionData$=l.subscriptionData$,this.lastUnpaidInvoiceDate$=l.lastUnpaidInvoiceDate$,this.outlets$=o.outlets$,this.showLoadButton$=o.showLoadButton$,this.from$=o.from$,this.to$=o.to$,a.initScript().subscribe()}static \u0275fac=function(e){return new(e||t)(x(le),x(Ue),x(Pe),x(Dt))};static \u0275cmp=T({type:t,selectors:[["POS-my-subscription-v2"]],standalone:!1,features:[oi([le,Ue,Pe])],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"subs-container"],[1,"content"],[1,"d-flex","flex-sm-row","flex-column",2,"column-gap","20px"],[1,"left-container"],[3,"invoices","WHTPercentage","VATEnabled","subscriptionStatus","currency"],[3,"lastMonthDate","currentDate","outlets","showLoadButton"],[1,"right-container"],[3,"subscribedSince","outlets","frequency","total"],[3,"updateBillingOnPageLoad","lastUnpaidInvoiceDate","email","phone","mobilePhone","recurringStatus"],[3,"addons","currency"],[3,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress"]],template:function(e,o){if(e&1&&(m(0,_a,18,32,"mainpanel-cmp",0),b(1,"async")),e&2){let a;p((a=D(1,1,o.subscriptionData$))?0:-1,a)}},dependencies:[re,ze,Et,Pt,Ft,kt,Vt,mi],styles:[".subs-container[_ngcontent-%COMP%]{padding:18px 20px 0;background:#fafaf9}.subs-container[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding-left:15px}.subs-container[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{width:60%}.subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:40%}@media(max-width:576px){.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%], .subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:100%}}"]})};function ga(t,l){if(t&1){let e=v();n(0,"div",14),C("click",function(){f(e);let a=d().$index,c=d(2);return _(c.readMore(a))}),r(1," read more... "),i()}}function Ca(t,l){if(t&1&&(n(0,"tr",10)(1,"td")(2,"b"),r(3),i(),g(4,"div",12),m(5,ga,2,0,"div",13),i(),n(6,"td"),r(7),b(8,"date"),i(),n(9,"td"),r(10),i()()),t&2){let e=l.$implicit;s(3),h(e.Header),s(),u("innerHTML",e.displayedMessage,q),s(),p(e.showReadMore?5:-1),s(2),h(O(8,5,e.Created,"dd MMM yyyy HH:mm")),s(3),h(e.IsFinished?"Finished":"In Progress")}}function ba(t,l){if(t&1){let e=v();n(0,"mat-paginator",15),C("page",function(a){f(e);let c=d(2);return _(c.onPaginationChange(a))}),i()}if(t&2){let e=d(2);u("length",e.pagination.listTotal())("pageSize",e.pagination.pageSize())("pageIndex",e.pageData().Filter.PageNumber==0?0:e.pageData().Filter.PageNumber-1)}}function xa(t,l){if(t&1){let e=v();n(0,"mainpanel-cmp",1),C("onSubmit",function(){f(e);let a=d();return _(a.searchFromPageOne())}),n(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),r(6,"From"),i(),n(7,"datepicker",4),w("dateChange",function(a){f(e);let c=d();return M(c.pageData().Filter.From,a)||(c.pageData().Filter.From=a),_(a)}),i()(),n(8,"div")(9,"h6"),r(10,"To"),i(),n(11,"datepicker",5),w("dateChange",function(a){f(e);let c=d();return M(c.pageData().Filter.To,a)||(c.pageData().Filter.To=a),_(a)}),i()()()()(),n(12,"content")(13,"div",6)(14,"table",7)(15,"thead",8)(16,"tr",9)(17,"th"),r(18,"Message"),i(),n(19,"th"),r(20,"Created"),i(),n(21,"th"),r(22,"Status"),i()()(),n(23,"tbody"),N(24,Ca,11,8,"tr",10,R),i()(),n(26,"div"),m(27,ba,1,3,"mat-paginator",11),i()()()()}if(t&2){let e=d();u("pageData",e.menuData())("hideSearchBox",!0),s(7),S("date",e.pageData().Filter.From),s(4),S("date",e.pageData().Filter.To),s(13),F(e.data().Data),s(3),p(e.pagination.listTotal()>0?27:-1)}}var qe=class t extends Re{constructor(l,e){super(l,e,"AsyncNotification/Get","AsyncNotification/Loader")}preInitList(){let l=new Date;l.setHours(0,0,0,0);let e=new Date;e.setHours(23,59,59,59),this.pageData().Filter.From=l,this.pageData().Filter.To=e}postInit(l){l.Data.forEach(e=>{let o=e.Body;e.displayedMessage=o.length<=120?o:o.slice(0,120),e.showReadMore=o.length>120})}readMore(l){this.data().Data[l].displayedMessage=this.data().Data[l].Body,this.data().Data[l].showReadMore=!1}static \u0275fac=function(e){return new(e||t)(x(ge),x(P))};static \u0275cmp=T({type:t,selectors:[["POS-async-notification"]],features:[ue],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],[1,"d-flex"],["container",""],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],[2,"word-break","break-all",3,"innerHTML"],[1,"text-primary","pointer"],[1,"text-primary","pointer",3,"click"],[3,"page","length","pageSize","pageIndex"]],template:function(e,o){e&1&&m(0,xa,28,5,"mainpanel-cmp",0),e&2&&p(o.data()?0:-1)},dependencies:[Be,re,Te,Ae,gt,ne,_e,j],encapsulation:2})};var ha=[{path:"Main/My_Profile",component:ht,data:{unauthorizedRedirect:"menu/Unauthorized/Main/Unauthorized",roles:[bi.developer.Api]}},{path:"Main/My_Subscription",component:At},{path:"Notification/Push",component:je},{path:"Notification/Async",component:qe},{path:"Main/My_Sales",component:vt},{path:"Main/My_Subscription/Choose_your_plan",component:Mt}],Rt=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=nt({type:t});static \u0275inj=it({imports:[Bt.forChild(ha),Bt]})};var qi=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=nt({type:t});static \u0275inj=it({providers:[j],imports:[_e,ne,pt,Rt,Be,Ti,Z,bt,Ae,Te,De,Ni,Pi,_t,Ai,We,Le,xt,Wi,Ii,ze,je,He,qe]})};export{qi as ProfileModule};
|