dealpos 1.0.0
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/POS/3rdpartylicenses.txt +1645 -0
- package/POS/assets/icons/icon-128x128.png +0 -0
- package/POS/assets/icons/icon-144x144.png +0 -0
- package/POS/assets/icons/icon-152x152.png +0 -0
- package/POS/assets/icons/icon-192x192.png +0 -0
- package/POS/assets/icons/icon-384x384.png +0 -0
- package/POS/assets/icons/icon-512x512.png +0 -0
- package/POS/assets/icons/icon-72x72.png +0 -0
- package/POS/assets/icons/icon-96x96.png +0 -0
- package/POS/chunk-26YXEYJK.js +1 -0
- package/POS/chunk-2DNKBN6G.js +1 -0
- package/POS/chunk-2FKYC63K.js +1 -0
- package/POS/chunk-2FWFPV5I.js +1 -0
- package/POS/chunk-2OSKJOSS.js +1 -0
- package/POS/chunk-2OXMYDYT.js +1 -0
- package/POS/chunk-2OZMF5DL.js +1 -0
- package/POS/chunk-2W3MAOOP.js +1 -0
- package/POS/chunk-33XCA4ER.js +14 -0
- package/POS/chunk-35V3VL6F.js +1 -0
- package/POS/chunk-3A7KA4YN.js +1 -0
- package/POS/chunk-3BODNSIH.js +1 -0
- package/POS/chunk-3FOIEYAT.js +4 -0
- package/POS/chunk-3PFXZUB6.js +7 -0
- package/POS/chunk-3QABPVXZ.js +3 -0
- package/POS/chunk-4BDQDYVB.js +1 -0
- package/POS/chunk-4CBDK52E.js +4 -0
- package/POS/chunk-4G26RHGA.js +1 -0
- package/POS/chunk-4MX7Q77M.js +2 -0
- package/POS/chunk-4UAHOTBD.js +1 -0
- package/POS/chunk-56EQRIAH.js +1 -0
- package/POS/chunk-5KBFQLSN.js +1 -0
- package/POS/chunk-5W7F4VJH.js +1 -0
- package/POS/chunk-64PDX5ZX.js +1 -0
- package/POS/chunk-65YDOCXF.js +1 -0
- package/POS/chunk-67VBXFVT.js +6 -0
- package/POS/chunk-6BQZINLH.js +1 -0
- package/POS/chunk-6L6CIH5M.js +1 -0
- package/POS/chunk-6PXJEE4K.js +1 -0
- package/POS/chunk-6S4Q5VRA.js +1 -0
- package/POS/chunk-75STMWUR.js +6 -0
- package/POS/chunk-76C33PK5.js +1 -0
- package/POS/chunk-77D6X2SQ.js +11 -0
- package/POS/chunk-7DWKYGA4.js +1 -0
- package/POS/chunk-7M6CWVRI.js +1 -0
- package/POS/chunk-7Q3437BR.js +1 -0
- package/POS/chunk-AA32I4UN.js +1 -0
- package/POS/chunk-AJMKP7YZ.js +1 -0
- package/POS/chunk-AOJW6WJT.js +1 -0
- package/POS/chunk-AOPKPEVH.js +1 -0
- package/POS/chunk-APJK7OH2.js +2 -0
- package/POS/chunk-APYNCJ2H.js +1 -0
- package/POS/chunk-AUYYX2UQ.js +45 -0
- package/POS/chunk-AVDGNFC7.js +1 -0
- package/POS/chunk-AWGZKLLY.js +1 -0
- package/POS/chunk-AYKDALBT.js +1 -0
- package/POS/chunk-B2OT7HA4.js +4 -0
- package/POS/chunk-B36XIZVJ.js +1 -0
- package/POS/chunk-B5FODXLM.js +1 -0
- package/POS/chunk-B7RM5KKA.js +1 -0
- package/POS/chunk-BCVO66L3.js +5 -0
- package/POS/chunk-BETKNHFK.js +1 -0
- package/POS/chunk-BH2ZVZIU.js +1 -0
- package/POS/chunk-BHXS5IA6.js +1 -0
- package/POS/chunk-BLZEDUEI.js +1 -0
- package/POS/chunk-BYXBJQAS.js +0 -0
- package/POS/chunk-BZC5JINN.js +5 -0
- package/POS/chunk-C43IYFVU.js +1 -0
- package/POS/chunk-CBW7IA6S.js +1 -0
- package/POS/chunk-CCGPOEE3.js +4 -0
- package/POS/chunk-CFIFFKWA.js +1 -0
- package/POS/chunk-CI45CZMG.js +1 -0
- package/POS/chunk-CJO25BBP.js +1 -0
- package/POS/chunk-CLL3TEL5.js +1 -0
- package/POS/chunk-CPUGWH3I.js +1 -0
- package/POS/chunk-CPW6IWAB.js +1 -0
- package/POS/chunk-CRSUSQ3W.js +1 -0
- package/POS/chunk-CW27R4N3.js +2 -0
- package/POS/chunk-CWU5DTSS.js +1 -0
- package/POS/chunk-CY2FQLP4.js +1 -0
- package/POS/chunk-DRGWLGRP.js +1 -0
- package/POS/chunk-DXF4M3Z6.js +1 -0
- package/POS/chunk-E72IOARD.js +1 -0
- package/POS/chunk-EA7CLJMQ.js +18 -0
- package/POS/chunk-ECMSF3OR.js +1 -0
- package/POS/chunk-EOFWQEK7.js +1 -0
- package/POS/chunk-EQOB7536.js +156 -0
- package/POS/chunk-ESD5O3BQ.js +1 -0
- package/POS/chunk-EZCHVNC5.js +3 -0
- package/POS/chunk-F3ZYFWTM.js +1 -0
- package/POS/chunk-F6GAPEFT.js +1 -0
- package/POS/chunk-FBR7TAEJ.js +5 -0
- package/POS/chunk-FE5LZK5I.js +1 -0
- package/POS/chunk-FOEYBSQT.js +2 -0
- package/POS/chunk-FWVI7M5F.js +1 -0
- package/POS/chunk-G4DDQBH4.js +1 -0
- package/POS/chunk-GDFWXFK2.js +1 -0
- package/POS/chunk-GHQFOULJ.js +2 -0
- package/POS/chunk-GNSQPTDB.js +1 -0
- package/POS/chunk-GSLPZSSX.js +1 -0
- package/POS/chunk-GVXSG66Q.js +1 -0
- package/POS/chunk-H55AJAX5.js +8 -0
- package/POS/chunk-HIRUHGYD.js +2 -0
- package/POS/chunk-HKR2C3HA.js +1 -0
- package/POS/chunk-HSOC6U4B.js +1 -0
- package/POS/chunk-I6CGSFEU.js +1 -0
- package/POS/chunk-I6YPWC52.js +1 -0
- package/POS/chunk-IDDHFZWG.js +1 -0
- package/POS/chunk-IE5R6YWY.js +1 -0
- package/POS/chunk-IOQ3OION.js +1 -0
- package/POS/chunk-IUKSWU5B.js +1 -0
- package/POS/chunk-IY6EDHBT.js +1 -0
- package/POS/chunk-IZGPRDGN.js +2 -0
- package/POS/chunk-J3W6DQKW.js +1 -0
- package/POS/chunk-JLWKTGB2.js +1 -0
- package/POS/chunk-JM3SJLS7.js +1 -0
- package/POS/chunk-JNUC6PO5.js +1 -0
- package/POS/chunk-K5XVN3MT.js +1 -0
- package/POS/chunk-KBQ5ZM55.js +1 -0
- package/POS/chunk-KCNSCS4R.js +1 -0
- package/POS/chunk-KI2MQKDF.js +1 -0
- package/POS/chunk-KNRLGMUT.js +1 -0
- package/POS/chunk-KR4OPCRF.js +1 -0
- package/POS/chunk-KW4B7WMB.js +1 -0
- package/POS/chunk-KYX6U2UX.js +1 -0
- package/POS/chunk-KZNSGBGF.js +2 -0
- package/POS/chunk-L3UWNQXB.js +1 -0
- package/POS/chunk-LHWN2J4H.js +15 -0
- package/POS/chunk-LJUP6CCS.js +1 -0
- package/POS/chunk-LY4FOMQ6.css +1 -0
- package/POS/chunk-LZ3SKBTU.js +1 -0
- package/POS/chunk-M5ONTRWK.js +1 -0
- package/POS/chunk-MA7NEQCZ.js +1 -0
- package/POS/chunk-MDKYCLYA.js +17 -0
- package/POS/chunk-MGDA6GY6.js +1 -0
- package/POS/chunk-MWWGZRMN.js +1 -0
- package/POS/chunk-NCATMO6T.js +1 -0
- package/POS/chunk-NDAI7L23.js +1 -0
- package/POS/chunk-NHUK6IK5.js +40 -0
- package/POS/chunk-NUZ5K7GT.js +1 -0
- package/POS/chunk-O2PELRQA.js +1 -0
- package/POS/chunk-OUOP65JB.js +1 -0
- package/POS/chunk-OXSD6KML.js +1 -0
- package/POS/chunk-PEOMRJUI.js +3 -0
- package/POS/chunk-PHGK3EAU.js +1 -0
- package/POS/chunk-PLC4GZ67.js +1 -0
- package/POS/chunk-PTF6AQY6.js +1 -0
- package/POS/chunk-PTXKBWBA.js +1 -0
- package/POS/chunk-Q3SJOSAG.js +1 -0
- package/POS/chunk-QBDEGNJP.js +1 -0
- package/POS/chunk-QCTMAR3L.js +1 -0
- package/POS/chunk-QZWOQRAM.js +1 -0
- package/POS/chunk-R5VG3XDC.js +1 -0
- package/POS/chunk-R7NR3M2Q.js +1 -0
- package/POS/chunk-RBKYZOZX.js +3 -0
- package/POS/chunk-RHQGCHFI.js +1 -0
- package/POS/chunk-RL3GYZVU.js +8 -0
- package/POS/chunk-RRKCUSBB.js +1 -0
- package/POS/chunk-S4OLP2TR.js +18 -0
- package/POS/chunk-SDH32O74.js +1 -0
- package/POS/chunk-SE7OFLAL.js +1 -0
- package/POS/chunk-SEVYM4GA.js +1 -0
- package/POS/chunk-SGRJ5YG2.js +1 -0
- package/POS/chunk-SNNLFZQ3.js +3 -0
- package/POS/chunk-SVNOJVQF.js +1 -0
- package/POS/chunk-TCLYGBIP.js +1 -0
- package/POS/chunk-TIDDF777.js +1 -0
- package/POS/chunk-TJQIORGG.js +1 -0
- package/POS/chunk-TK5H65DN.js +1 -0
- package/POS/chunk-TLHNFDPP.js +1 -0
- package/POS/chunk-TVNDX4KA.js +3 -0
- package/POS/chunk-TX6G2LAN.js +1 -0
- package/POS/chunk-U3O6FO5X.js +1 -0
- package/POS/chunk-UJMXJABS.js +1 -0
- package/POS/chunk-UNGT7KQO.js +1 -0
- package/POS/chunk-UPRH3DLS.js +1 -0
- package/POS/chunk-UVFDCVT4.js +2 -0
- package/POS/chunk-V22EVF6N.js +1 -0
- package/POS/chunk-V4RKZMUB.js +11 -0
- package/POS/chunk-VBOV2ZGQ.js +1 -0
- package/POS/chunk-VGGNSOCP.js +1 -0
- package/POS/chunk-VLGOEX3D.js +24 -0
- package/POS/chunk-VPAQFQA7.js +1 -0
- package/POS/chunk-VSMYP4AC.js +1 -0
- package/POS/chunk-VXCP4DBC.js +1 -0
- package/POS/chunk-W43P2XHR.js +1 -0
- package/POS/chunk-W7PIRMKD.js +1 -0
- package/POS/chunk-WG6PV6VL.js +4 -0
- package/POS/chunk-WK4T26FX.js +2 -0
- package/POS/chunk-WKS7JIOA.js +1 -0
- package/POS/chunk-WKXE4B24.js +1 -0
- package/POS/chunk-WLRXTHLM.js +1 -0
- package/POS/chunk-WSZGVB3P.js +1 -0
- package/POS/chunk-WXHOQKTU.js +1 -0
- package/POS/chunk-X55EKFUZ.js +1 -0
- package/POS/chunk-X7QMXCEW.js +4 -0
- package/POS/chunk-XIGLLWLV.js +1 -0
- package/POS/chunk-XRKZOON6.js +4 -0
- package/POS/chunk-XW2QKXZF.js +5 -0
- package/POS/chunk-XZPCPUT7.js +1 -0
- package/POS/chunk-Y5SPDICN.js +2 -0
- package/POS/chunk-Y7XBMFXR.js +1 -0
- package/POS/chunk-YATUCULL.js +1 -0
- package/POS/chunk-YBFOOZH4.js +2 -0
- package/POS/chunk-YBINYTS7.js +1 -0
- package/POS/chunk-YE2HNBMX.js +1 -0
- package/POS/chunk-YENHZRM5.js +9 -0
- package/POS/chunk-YHCFOJEX.js +1 -0
- package/POS/chunk-YKBQYDEJ.js +2 -0
- package/POS/chunk-YPFXYXHP.js +8 -0
- package/POS/chunk-YRHYSRBM.js +1 -0
- package/POS/chunk-YRITVFOW.js +1 -0
- package/POS/chunk-YRNTUREW.js +1 -0
- package/POS/chunk-YXRRTX7W.js +1 -0
- package/POS/chunk-Z426RGUL.js +24 -0
- package/POS/chunk-ZB45Y55B.js +1 -0
- package/POS/chunk-ZGRVB4IB.js +1 -0
- package/POS/chunk-ZJ3TX62Q.js +1 -0
- package/POS/chunk-ZKWXTWYY.js +1 -0
- package/POS/index.html +33 -0
- package/POS/main-CNMNNNEI.js +4 -0
- package/POS/main-VPAR6OBK.css +1 -0
- package/POS/manifest.webmanifest +59 -0
- package/POS/media/color-727V6BA6.png +0 -0
- package/POS/media/hue-3YTJE6JS.png +0 -0
- package/POS/media/primeicons-4GST5W3O.woff2 +0 -0
- package/POS/media/primeicons-DHQU4SEP.svg +345 -0
- package/POS/media/primeicons-GEFHGEHP.ttf +0 -0
- package/POS/media/primeicons-P53SE5CV.woff +0 -0
- package/POS/media/primeicons-RSSEDYLY.eot +0 -0
- package/POS/polyfills-FHOOFFEX.js +2 -0
- package/POS/scripts-3E2G6IZ4.js +10 -0
- package/POS/styles-T7FPZRNG.css +25 -0
- package/Styles/Master/app_custom.css +18 -0
- package/Styles/Master/login_custom.css +0 -0
- package/Styles/Print/PaperSize8cm_custom.css +1 -0
- package/Styles/Print/PaperSizeA4_custom.css +1 -0
- package/StylesB/Master/app_custom.css +0 -0
- package/package.json +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Hc as l,bb as c}from"./chunk-H55AJAX5.js";import{a as i,b as s}from"./chunk-KW4B7WMB.js";var U={equal:S};function d(o,r=U){let a=Object.keys(o),n=a.reduce((e,t)=>s(i({},e),{[t]:c(o[t],r)}),{});return{select(e,t=U){return l(()=>e(n),t)},update(e,t){let T=n[e];typeof t=="function"?T.update(t):T.set(t)},reset(){a.forEach(e=>{n[e].set(o[e])})}}}function S(o,r){return o===r}export{d as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Cc as V,La as T,M as I,Mc as _,Q as A,c as g,d as q,dd as R,ha as M,ia as K,ja as S,ka as O,la as C,n as B,qa as $,u as E,ua as F}from"./chunk-H55AJAX5.js";import{j as w,p}from"./chunk-KW4B7WMB.js";var D=function(s){return s.readonly="readonly",s.readwrite="readwrite",s}(D||{}),U=new S(null),Y=new S("Indexed DB"),J=new S("Server Indexed DB");function Q(s,h){return s.objectStoreNames.contains(h)}function j(s,h,e){s||e("You need to use the openDatabase function to create a database before you query it!"),Q(s,h)||e(`objectStore does not exists: ${h}`)}function b(s,h){let e=s.transaction(h.storeName,h.dbMode);return e.onerror=h.error,e.onabort=h.abort,e}function m(s,h,e,r){return{storeName:h,dbMode:s,error:t=>{e(t)},abort:t=>{e(t)}}}var P=[];function y(s,h,e,r){return new Promise((t,n)=>{s||n("IndexedDB not available");let o=s.open(h,e),c;o.onsuccess=i=>{c=o.result,P.push(c),t(c)},o.onerror=i=>{n(`IndexedDB error: ${o.error}`)},typeof r=="function"&&(o.onupgradeneeded=i=>{r(i,c)})})}function G(s,h,e,r,t){return w(this,null,function*(){return new Promise((n,o)=>{if(!s)return;let c=s.open(h,e);c.onupgradeneeded=i=>w(this,null,function*(){let a=i.target.result,u=r.map(f=>w(this,null,function*(){if(!a.objectStoreNames.contains(f.store)){let l=a.createObjectStore(f.store,f.storeConfig);for(let v of f.storeSchema)l.createIndex(v.name,v.keypath,v.options)}}));yield Promise.all(u);let d=t&&t();if(d){let f=Object.keys(d).map(l=>parseInt(l,10)).filter(l=>l>i.oldVersion).sort((l,v)=>l-v);for(let l of f)d[l](a,c.transaction)}a.close(),n()}),c.onsuccess=i=>{i.target.result.close(),n()},c.onerror=i=>{o(i)}})})}function W(s,h,e){if(!s||!h||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(r=>{try{let t=h+1,n=indexedDB.open(s,t);n.onupgradeneeded=o=>{let c=o.target.result;c.deleteObjectStore(e),c.close(),console.log("onupgradeneeded"),r.next(!0),r.complete()},n.onerror=o=>r.error(o)}catch(t){r.error(t)}})}function Z(s){return new Promise((h,e)=>{if(!s){e(new Error("No database to close"));return}try{s.close(),h()}catch(r){e(`Error closing database: ${r}`)}})}function x(){return function(s,h,e){let r=e.value;return e.value=function(...t){let n=r.apply(this,t);return n instanceof g?n.pipe(A(()=>w(this,null,function*(){let o=P.map(c=>w(this,null,function*(){yield Z(c),console.log("Database connection closed: ",c.name)}));yield Promise.all(o),P.length=0}))):n},e}}var N=(()=>{class s{constructor(e,r){this.dbConfigs=e,this.indexedDB=r,this.defaultDatabaseName=null,Object.values(this.dbConfigs).forEach((t,n,o)=>this.instanciateConfig(t,o.length===1))}instanciateConfig(e,r){return w(this,null,function*(){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");if((e.isDefault??!1)&&this.defaultDatabaseName)throw new Error("NgxIndexedDB: Only one database can be set as default");((e.isDefault??!1)&&!this.defaultDatabaseName||r)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),yield G(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),y(this.indexedDB,e.name).then(t=>{t.version!==e.version&&(V()&&(console.warn(`
|
|
2
|
+
Your DB Config doesn't match the most recent version of the DB with name ${e.name}, please update it
|
|
3
|
+
DB current version: ${t.version};
|
|
4
|
+
Your configuration: ${e.version};
|
|
5
|
+
`),console.warn(`Using latest version ${t.version}`)),this.dbConfigs[e.name].version=t.version),t.close()})})}get dbConfig(){return this.dbConfigs[this.selectedDb]}getDatabaseVersion(){return new g(e=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{e.next(r.version),e.complete()}).catch(r=>e.error(`error during get version of database => ${r} `))})}selectDb(e){if(e=e??this.defaultDatabaseName,!e)throw new Error("No database name specified and no default database set.");if(!Object.keys(this.dbConfigs).includes(e))throw new Error(`NgxIndexedDB: Database ${e} is not initialized.`);this.selectedDb=e}createObjectStore(e,r){return w(this,null,function*(){let t=[e];yield G(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,t,r)})}add(e,r,t){return new g(n=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let i=b(o,m(D.readwrite,e,u=>n.error(u))).objectStore(e),a=t?i.add(r,t):i.add(r);a.onsuccess=u=>w(this,null,function*(){let d=u.target.result,f=i.get(d);f.onsuccess=l=>{n.next(l.target.result),n.complete()},f.onerror=l=>{n.error(l)}}),a.onerror=u=>{n.error(u)}}).catch(o=>n.error(o))})}bulkAdd(e,r){let t=new Promise((n,o)=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let a=b(c,m(D.readwrite,e,n,o)).objectStore(e),u=r.map(d=>new Promise((f,l)=>{let v=d.key;delete d.key;let L=v?a.add(d,v):a.add(d);L.onsuccess=X=>{let H=X.target.result;f(H)}}));n(Promise.all(u))}).catch(c=>o(c))});return B(t)}bulkDelete(e,r){let t=r.map(n=>new Promise((o,c)=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let a=b(i,m(D.readwrite,e,c,o));a.objectStore(e).delete(n),a.oncomplete=()=>{this.getAll(e).pipe(I(1)).subscribe(d=>{o(d)})}}).catch(i=>c(i))}));return B(Promise.all(t))}getByKey(e,r){return new g(t=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{let i=b(n,m(D.readonly,e,t.error)).objectStore(e).get(r);i.onsuccess=a=>{t.next(a.target.result),t.complete()},i.onerror=a=>{t.error(a)}}).catch(n=>t.error(n))})}bulkGet(e,r){let t=r.map(n=>this.getByKey(e,n));return new g(n=>{E(t).subscribe(o=>{n.next(o),n.complete()})})}getByID(e,r){return new g(t=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,a=>t.error(a));let i=b(n,m(D.readonly,e,t.error,t.next)).objectStore(e).get(r);i.onsuccess=a=>{t.next(a.target.result)}}).catch(n=>t.error(n))})}getByIndex(e,r,t){return new g(n=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{j(o,e,d=>n.error(d));let u=b(o,m(D.readonly,e,n.error)).objectStore(e).index(r).get(t);u.onsuccess=d=>{n.next(d.target.result),n.complete()}}).catch(o=>n.error(o))})}getAll(e){return new g(r=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{j(t,e,i=>r.error(i));let c=b(t,m(D.readonly,e,r.error,r.next)).objectStore(e).getAll();c.onerror=i=>{r.error(i)},c.onsuccess=({target:{result:i}})=>{r.next(i),r.complete()}}).catch(t=>r.error(t))})}update(e,r){return new g(t=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,a=>t.error(a));let c=b(n,m(D.readwrite,e,a=>t.error(a))).objectStore(e),i=c.put(r);i.onsuccess=a=>w(this,null,function*(){let u=a.target.result,d=c.get(u);d.onsuccess=f=>{t.next(f.target.result),t.complete()}})}).catch(n=>t.error(n))})}bulkPut(e,r){let t;return new g(n=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{j(o,e,i=>n.error(i)),t=b(o,m(D.readwrite,e,i=>n.error(i)));let c=t.objectStore(e);r.forEach((i,a)=>{let u=c.put(i);a===r.length-1&&(u.onsuccess=d=>{t.commit(),n.next(d.target.result),n.complete()}),u.onerror=d=>{t.abort(),n.error(d)}})}).catch(o=>{t?.abort(),n.error(o)})})}delete(e,r){return new g(t=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,i=>t.error(i));let o=b(n,m(D.readwrite,e,i=>t.error(i)));o.objectStore(e).delete(r),o.oncomplete=()=>{this.getAll(e).pipe(I(1)).subscribe(i=>{t.next(i),t.complete()})}}).catch(n=>t.error(n))})}deleteByKey(e,r){return new g(t=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,i=>t.error(i));let o=b(n,m(D.readwrite,e,i=>t.error(i))),c=o.objectStore(e);o.oncomplete=()=>{t.next(!0),t.complete()},c.delete(r)}).catch(n=>t.error(n))})}clear(e){return new g(r=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{j(t,e,c=>r.error(c));let n=b(t,m(D.readwrite,e,c=>r.error(c)));n.objectStore(e).clear(),n.oncomplete=()=>{r.next(!0),r.complete()}}).catch(t=>r.error(t))})}deleteDatabase(){return new g(e=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>w(this,null,function*(){yield r.close();let t=this.indexedDB.deleteDatabase(this.dbConfig.name);t.onsuccess=()=>{e.next(!0),e.complete()},t.onerror=n=>e.error(n),t.onblocked=()=>{console.warn("Delete blocked: Ensure all tabs, instances, or connections are closed. Database name:",this.dbConfig.name),e.error(new Error("Unable to delete database because it's blocked"))}})).catch(r=>e.error(r))})}openCursor(e,r,t="next"){return new g(n=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{j(o,e,u=>n.error(u));let i=b(o,m(D.readwrite,e,n.error)).objectStore(e),a=r===void 0?i.openCursor():i.openCursor(r,t);a.onsuccess=u=>{n.next(u),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(e,r,t,n="next",o=D.readonly){let c=new q;return y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{j(i,e,l=>{c.error(l)});let f=b(i,m(o,e,l=>{c.error(l)},()=>{c.next()})).objectStore(e).index(r).openCursor(t,n);f.onsuccess=l=>{c.next(l)}}).catch(i=>c.error(i)),c}getAllByIndex(e,r,t){let n=[];return new g(o=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{j(c,e,f=>o.error(f));let d=b(c,m(D.readonly,e,o.error)).objectStore(e).index(r).openCursor(t);d.onsuccess=f=>{let l=f.target.result;l?(n.push(l.value),l.continue()):(o.next(n),o.complete())}}).catch(c=>o.error(c))})}getAllKeysByIndex(e,r,t){let n=[];return new g(o=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{j(c,e,f=>o.error(f));let d=b(c,m(D.readonly,e,o.error)).objectStore(e).index(r).openKeyCursor(t);d.onsuccess=f=>{let l=f.target.result;l?(n.push({primaryKey:l.primaryKey,key:l.key}),l.continue()):(o.next(n),o.complete())}}).catch(c=>o.error(c))})}count(e,r){return new g(t=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,a=>t.error(a));let i=b(n,m(D.readonly,e,t.error)).objectStore(e).count(r);i.onerror=a=>t.error(a),i.onsuccess=a=>{t.next(a.target.result),t.complete()}}).catch(n=>t.error(n))})}countByIndex(e,r,t){return new g(n=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{j(o,e,d=>n.error(d));let u=b(o,m(D.readonly,e,n.error)).objectStore(e).index(r).count(t);u.onerror=d=>n.error(d),u.onsuccess=d=>{n.next(d.target.result),n.complete()}}).catch(o=>n.error(o))})}deleteObjectStore(e){return W(this.dbConfig.name,++this.dbConfig.version,e)}getAllObjectStoreNames(){return new g(e=>{y(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{e.next([...r.objectStoreNames]),e.complete()}).catch(r=>e.error(r))})}static{this.\u0275fac=function(r){return new(r||s)(O(U),O(Y))}}static{this.\u0275prov=M({token:s,factory:s.\u0275fac})}}return p([x()],s.prototype,"getDatabaseVersion",null),p([x()],s.prototype,"add",null),p([x()],s.prototype,"bulkAdd",null),p([x()],s.prototype,"bulkDelete",null),p([x()],s.prototype,"getByKey",null),p([x()],s.prototype,"bulkGet",null),p([x()],s.prototype,"getByID",null),p([x()],s.prototype,"getByIndex",null),p([x()],s.prototype,"getAll",null),p([x()],s.prototype,"update",null),p([x()],s.prototype,"bulkPut",null),p([x()],s.prototype,"delete",null),p([x()],s.prototype,"deleteByKey",null),p([x()],s.prototype,"clear",null),p([x()],s.prototype,"deleteDatabase",null),p([x()],s.prototype,"openCursor",null),p([x()],s.prototype,"openCursorByIndex",null),p([x()],s.prototype,"getAllByIndex",null),p([x()],s.prototype,"getAllKeysByIndex",null),p([x()],s.prototype,"count",null),p([x()],s.prototype,"countByIndex",null),p([x()],s.prototype,"getAllObjectStoreNames",null),s})(),k=class{cmp(){return 0}databases(){return Promise.resolve([])}deleteDatabase(){return{onupgradeneeded:null,onblocked:null,onerror:null,onsuccess:null,error:null}}open(){return{onupgradeneeded:null,onblocked:null,onerror:null,onsuccess:null,error:null}}};function z(){F(z);let s=C(T),h=C(J,{optional:!0})??new k;return R(s)?C(_).defaultView.indexedDB:h}var ee=(...s)=>{let h=s.reduce((e,r)=>(e[r.name]=r,e),{});return[N,{provide:U,useValue:h},{provide:Y,useFactory:z}]},he=(()=>{class s{static forRoot(...e){return{ngModule:s,providers:[...ee(...e)]}}static{this.\u0275fac=function(r){return new(r||s)}}static{this.\u0275mod=$({type:s})}static{this.\u0275inj=K({})}}return s})();export{N as a,he as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as n}from"./chunk-26YXEYJK.js";import{Nd as a,la as e}from"./chunk-H55AJAX5.js";var h=(t,u)=>{let s=e(n),r=e(a),o=t.data?.roles;if(o){let i=t.data?.unauthorizedRedirect;if(!o.some(c=>s.isUserHasRole(c)))return i?r.navigate([i]):r.navigate(["menu/Unauthorized/Main/Unauthorized"]),!1}return!0};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as G,b as K}from"./chunk-WSZGVB3P.js";import{d as ee,e as te}from"./chunk-XW2QKXZF.js";import{a as Q}from"./chunk-YBINYTS7.js";import{g as Z,h as $}from"./chunk-XRKZOON6.js";import{b as Y}from"./chunk-CBW7IA6S.js";import{e as U,f as X}from"./chunk-WK4T26FX.js";import{C as z,c as R,h as j,n as H}from"./chunk-4G26RHGA.js";import{d as A}from"./chunk-26YXEYJK.js";import{a as q}from"./chunk-RRKCUSBB.js";import{$b as x,$c as J,Ab as o,Fb as S,Ib as C,Kb as s,Od as N,Pc as I,Qd as O,Rc as T,Sc as E,Sd as B,Ua as p,Va as _,Zb as m,Zc as P,cc as b,cd as V,dc as h,eb as v,ec as f,gb as u,gc as w,hc as L,ic as k,jc as M,mb as l,pa as F,qc as D,sc as y,wa as d,wc as W,xa as g,zb as i}from"./chunk-H55AJAX5.js";var oe=()=>["/menu/Developer/Webhook/Job_Logs/Detail"],ae=a=>({ID:a}),ne=(a,c)=>({"text-success":a,"text-danger":c});function re(a,c){if(a&1){let e=S();i(0,"div",12)(1,"h6"),m(2,"Status"),o(),i(3,"ng-select",13),f("ngModelChange",function(t){d(e);let r=s(2);return h(r.pageData.Filter.Status,t)||(r.pageData.Filter.Status=t),g(t)}),o(),i(4,"h6"),m(5,"Job ID"),o(),i(6,"input",14),f("ngModelChange",function(t){d(e);let r=s(2);return h(r.pageData.Filter.JobID,t)||(r.pageData.Filter.JobID=t),g(t)}),o(),i(7,"h6"),m(8,"From"),o(),i(9,"datepicker",15),f("dateChange",function(t){d(e);let r=s(2);return h(r.pageData.Filter.From,t)||(r.pageData.Filter.From=t),g(t)}),o(),i(10,"h6"),m(11,"To"),o(),i(12,"datepicker",16),f("dateChange",function(t){d(e);let r=s(2);return h(r.pageData.Filter.To,t)||(r.pageData.Filter.To=t),g(t)}),o()()}if(a&2){let e=s(2);p(3),l("disabled",!e.role.developer.Edit)("items",e.pageData.Options.Status),b("ngModel",e.pageData.Filter.Status),p(3),b("ngModel",e.pageData.Filter.JobID),p(3),l("isFloatingLabel",!1),b("date",e.pageData.Filter.From),p(3),l("isFloatingLabel",!1),b("date",e.pageData.Filter.To)}}function pe(a,c){if(a&1&&(i(0,"tr",17)(1,"td")(2,"a",18),m(3),D(4,"date"),o()(),i(5,"td"),m(6),D(7,"number"),o(),i(8,"td",19),m(9),o()()),a&2){let e=c.$implicit;p(2),l("routerLink",L(12,oe))("queryParams",k(13,ae,e._id)),p(),x(" ",y(4,6,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," "),p(3),x("",y(7,9,e.DurationInSecond,"1.1-1")," s"),p(2),l("ngClass",M(15,ne,e._source.log.respCode==200,e._source.log.respCode!=200)),p(),x(" ",e._source.log.respCode," ")}}function le(a,c){if(a&1){let e=S();i(0,"mat-paginator",20),C("page",function(t){d(e);let r=s(2);return g(r.onPaginationChange(t))}),o()}if(a&2){let e=s(2);l("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function me(a,c){if(a&1){let e=S();i(0,"mainpanel-cmp",2),C("onSubmit",function(){d(e);let t=s();return g(t.searchFromPageOne())}),i(1,"filters"),u(2,re,13,8,"ng-template",null,0,W),o(),i(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr",7)(10,"th",8),m(11,"Created"),o(),i(12,"th",8),m(13,"Duration"),o(),i(14,"th",8),m(15,"Status"),o()()(),i(16,"tbody"),u(17,pe,10,18,"tr",9),o()()(),i(18,"div",10),u(19,le,1,3,"mat-paginator",11),o()()()()}if(a&2){let e=s();l("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),p(17),l("ngForOf",e.data.hits),p(2),l("ngIf",e.pagination.listTotal>0)}}var ie=class a extends Q{constructor(e,n,t,r){super(e,n,"Developer/DeveloperSpace/Webhook/JobLogs","Developer/DeveloperSpace/WebhookLoader/GetLogs",t);this.httpService=n;this.role=r}postInit(e){this.data.hits=this.data?.hits.map(n=>(n.DurationInSecond=parseInt(n._source?.Duration)/1e3,n)),this.data.ListTotal=e?.total?.value}static \u0275fac=function(n){return new(n||a)(_(Y),_(q),_(B),_(A))};static \u0275cmp=F({type:a,selectors:[["app-webhook-job-logs"]],standalone:!0,features:[v,w],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown","onSubmit",4,"ngIf"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","50px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"mt-2"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose a status","appendTo","body",3,"ngModelChange","disabled","items","ngModel"],["type","text",1,"form-control",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline",3,"dateChange","isFloatingLabel","date"],[1,"border-bottom"],[3,"routerLink","queryParams"],[3,"ngClass"],[3,"page","length","pageSize","pageIndex"]],template:function(n,t){n&1&&u(0,me,20,5,"mainpanel-cmp",1),n&2&&l("ngIf",t.data)},dependencies:[V,I,T,E,J,P,$,Z,te,ee,K,G,X,U,z,R,j,H,O,N]})};export{ie as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"./chunk-VPAQFQA7.js";import{Aa as r,Ab as m,Bb as p,eb as l,gc as C,lb as s,pa as a,qb as c,ya as o,zb as d}from"./chunk-H55AJAX5.js";var h=(()=>{class t extends f{static \u0275fac=(()=>{let n;return function(e){return(n||(n=r(t)))(e||t)}})();static \u0275cmp=a({type:t,selectors:[["AngleRightIcon"]],standalone:!0,features:[l,C],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(i,e){i&1&&(o(),d(0,"svg",0),p(1,"path",1),m()),i&2&&(c(e.getClassNames()),s("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as n,e as i,ha as a}from"./chunk-H55AJAX5.js";var s=class e{_destinationOutlet=new i(null);destinationOutlet$=this._destinationOutlet.asObservable();updateDestinationOutlet(t){this._destinationOutlet.next(t)}_items=new i(null);items$=this._items.asObservable().pipe(n(t=>t!==null));updateItems(t){this._items.next(t)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})};export{s as a};
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as Ai,b as Vi}from"./chunk-FOEYBSQT.js";import{a as ct}from"./chunk-2DNKBN6G.js";import{a as lt,b as di}from"./chunk-WSZGVB3P.js";import"./chunk-TCLYGBIP.js";import{b as ki,c as Fi}from"./chunk-KCNSCS4R.js";import{a as Oi,b as Ni}from"./chunk-RL3GYZVU.js";import{d as ke,e as Pi}from"./chunk-XW2QKXZF.js";import"./chunk-EZCHVNC5.js";import"./chunk-64PDX5ZX.js";import"./chunk-CJO25BBP.js";import{a as rt}from"./chunk-W43P2XHR.js";import{a as Ii,b as Ei}from"./chunk-AJMKP7YZ.js";import{a as Ti,b as Di}from"./chunk-M5ONTRWK.js";import{d as Mi,e as wi}from"./chunk-Y5SPDICN.js";import{a as Oe}from"./chunk-YBINYTS7.js";import"./chunk-AA32I4UN.js";import"./chunk-I6YPWC52.js";import{a as _i,b as gi}from"./chunk-FBR7TAEJ.js";import{g as ee,h as yi}from"./chunk-XRKZOON6.js";import"./chunk-4CBDK52E.js";import{a as ui,b as pe}from"./chunk-CBW7IA6S.js";import"./chunk-VPAQFQA7.js";import"./chunk-AOPKPEVH.js";import{N as Si,O as Ci,k as Q,l as ie,m as le,o as Y,p as K,q as pt}from"./chunk-V4RKZMUB.js";import{Aa as be,Ba as ci}from"./chunk-2FKYC63K.js";import{G as st,O as vi,g as mt,o as bi,s as hi,v as xi}from"./chunk-2W3MAOOP.js";import{a as ai}from"./chunk-AWGZKLLY.js";import"./chunk-DXF4M3Z6.js";import{e as Ne,f as fi}from"./chunk-WK4T26FX.js";import"./chunk-BCVO66L3.js";import"./chunk-LHWN2J4H.js";import{a as V}from"./chunk-2FWFPV5I.js";import{A as nt,B as mi,C as ot,D as si,c as z,e as Bt,h as R,i as Se,k as De,n as j,o as Ce,s as ri,t as li,x as Pe,z as pi}from"./chunk-4G26RHGA.js";import"./chunk-R7NR3M2Q.js";import"./chunk-MA7NEQCZ.js";import{a as U,d as at}from"./chunk-26YXEYJK.js";import{a as je}from"./chunk-WG6PV6VL.js";import{a as T}from"./chunk-RRKCUSBB.js";import{$b as S,$c as re,Ab as t,Bb as _,Cb as F,Db as A,E as ce,Fa as Qe,Fb as C,Ha as Yt,Ib as x,Jc as ti,Kb as c,Ld as it,M as $t,Mc as ii,Nb as He,Nd as ve,Ob as Jt,Od as Te,Pa as P,Pc as et,Qa as xe,Qd as Rt,Rc as $,Sc as O,Sd as H,Ua as r,Va as u,W as ze,Xc as ni,Yb as B,Zb as o,Zc as Z,_ as te,_b as g,ac as Ie,ba as Qt,bc as Vt,c as Ue,cc as M,cd as tt,d as zt,da as Ge,dc as w,e as Ze,eb as ae,ec as I,fc as Xt,gb as d,gc as ei,ha as _e,hc as Je,ia as qe,ic as L,jc as Xe,ka as oe,la as Le,mb as m,o as Gt,ob as Ye,pa as y,pb as Ke,qa as $e,qb as ge,qc as f,qd as oi,rc as v,sc as D,t as se,tc as Ee,ub as Kt,wa as b,wc as de,x as qt,xa as h,zb as i}from"./chunk-H55AJAX5.js";import{a as Ut,b as Zt}from"./chunk-KW4B7WMB.js";function Lt(n){if(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray)return new DataView(n.buffer,n.byteOffset,n.byteLength);if(n instanceof ArrayBuffer)return new DataView(n);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var Zi="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",zi="0123456789ABCDEFGHIJKLMNOPQRSTUV",Gi="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Ht(n,l,e){e=e||{};let a,p;switch(l){case"RFC3548":case"RFC4648":a=Zi,p=!0;break;case"RFC4648-HEX":a=zi,p=!0;break;case"Crockford":a=Gi,p=!1;break;default:throw new Error("Unknown base32 variant: "+l)}let s=e.padding!==void 0?e.padding:p,E=Lt(n),q=0,N=0,fe="";for(let Be=0;Be<E.byteLength;Be++)for(N=N<<8|E.getUint8(Be),q+=8;q>=5;)fe+=a[N>>>q-5&31],q-=5;if(q>0&&(fe+=a[N<<5-q&31]),s)for(;fe.length%8!==0;)fe+="=";return fe}var dt=class n{constructor(l){this.dialogRef=l}config;ngOnInit(){this.config=new Y,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=V.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(e){return new(e||n)(u(Q))};static \u0275cmp=y({type:n,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,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"p",2),o(4,"Are you sure you want to disable two factor authentication for your account? "),t()()()()),e&2&&m("config",a.config)},dependencies:[K]})};function $i(n,l){if(n&1){let e=C();F(0),i(1,"div")(2,"div",3),o(3," Two Factor Authentication Status: "),i(4,"span",4),o(5,"Enabled"),t()()(),i(6,"div",5)(7,"button",6),x("click",function(){b(e);let p=c();return h(p.onDisableTotp())}),o(8,"Disable Two Factor Authentication"),t()(),A()}}function Qi(n,l){if(n&1){let e=C();i(0,"div",7)(1,"div",8)(2,"h4"),o(3,"Connect Your DealPOS account to an Authenticator Application"),t(),i(4,"p"),o(5,"Secure your login with One Time Password using an Authenticator Application!"),t()()(),i(6,"div",7)(7,"div",8)(8,"ol",9)(9,"li",10)(10,"h5"),o(11,"Download Authenticator application"),t(),i(12,"div",11)(13,"a",12),_(14,"img",13),o(15," Microsoft Authenticator "),t(),i(16,"a",14),_(17,"img",15),o(18," Google Authenticator "),t()()(),i(19,"li",16)(20,"h5"),o(21,"Scan the QR code below"),t(),i(22,"div",5),_(23,"qr-code",17),t()(),i(24,"li",16)(25,"h5"),o(26,"Validate your QR Code"),t(),i(27,"form",18),x("submit",function(){b(e);let p=c();return h(p.onValidate())}),i(28,"div")(29,"input",19),x("keypress",function(p){b(e);let s=c();return h(s.numberOnly(p))}),I("ngModelChange",function(p){b(e);let s=c();return w(s.validation2FA.ValidationCode,p)||(s.validation2FA.ValidationCode=p),h(p)}),t()(),i(30,"div",5)(31,"button",20),o(32,"Validate"),t()()()()()()()}if(n&2){let e=c();r(23),m("value",e.qrcodeContent)("size",265),r(6),M("ngModel",e.validation2FA.ValidationCode)}}var ut=class n{constructor(l,e,a,p){this.document=l;this.authenticatorService=e;this.toastrService=a;this.dialog=p;this.destroy$=new zt}qrcodeContent;validation2FA={SecretKey:null,ValidationCode:null,Enabled:!0};destroy$;totpEnabled;ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){let l=this.getDomainName(),e=this.generateRandomSecret();this.validation2FA.SecretKey=e;var a=U.parseJwt(localStorage.getItem("Token"));let p=a.LID;this.qrcodeContent=`otpauth://totp/${p}?secret=${e}&issuer=${l}`}generateRandomSecret(){let l=U.Guid_NewGuid(),e=new TextEncoder().encode(l);return Ht(e,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(Qt(this.destroy$)).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let l=!0;return U.IsEmpty(this.validation2FA.ValidationCode)?(l=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validation2FA.ValidationCode.length<6||this.validation2FA.ValidationCode.length>6)&&(l=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),l}numberOnly(l){return U.numberOnly(l)}onDisableTotp(){this.dialog.open(dt).afterClosed().pipe(ce(l=>U.IsNotEmpty(l)),te(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(e){return new(e||n)(u(ii),u(rt),u(H),u(le))};static \u0275cmp=y({type:n,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},decls:4,vars:2,consts:[["TOTP_ENABLED",""],[1,"container-fluid","mt-6"],[4,"ngIf","ngIfElse"],[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://res.cloudinary.com/pos/image/upload/v1666247461/POS/Images/Login/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://res.cloudinary.com/pos/image/upload/v1666247460/POS/Images/Login/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,a){if(e&1&&(i(0,"div",1),d(1,$i,9,0,"ng-container",2)(2,Qi,33,3,"ng-template",null,0,de),t()),e&2){let p=B(3);r(),m("ngIf",a.totpEnabled)("ngIfElse",p)}},dependencies:[O,Ce,z,R,Se,j,De,Oi],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
|
+
`],encapsulation:2})};var jt=n=>({active:n}),Ri=n=>({"ng-invalid ng-dirty":n}),Ji=(n,l)=>({border:n,"border-danger":l}),Xi=n=>({"border-top-0":n});function en(n,l){if(n&1){let e=C();i(0,"button",71),x("click",function(){b(e);let p=c(3);return h(p.validate())}),o(1," Submit "),t()}if(n&2){c(2);let e=B(36);m("disabled",e==null||e.form==null?null:e.form.invalid)}}function tn(n,l){if(n&1&&(F(0),d(1,en,2,1,"button",70),A()),n&2){let e=c(2);r(),m("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function nn(n,l){n&1&&(i(0,"small",75),o(1,"*Email is required"),t())}function on(n,l){n&1&&(i(0,"small",75),o(1,"*Enter a valid email address"),t())}function an(n,l){if(n&1&&(F(0),d(1,nn,2,0,"small",74)(2,on,2,0,"small",74),A()),n&2){c();let e=B(2);r(),m("ngIf",e.errors==null?null:e.errors.required),r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function rn(n,l){if(n&1){let e=C();i(0,"div",25)(1,"input",72,4),I("ngModelChange",function(p){b(e);let s=c(2);return w(s.formData.Email,p)||(s.formData.Email=p),h(p)}),t(),i(3,"label",73),o(4,"Email"),t(),d(5,an,3,2,"ng-container",7),t()}if(n&2){let e=B(2),a=c(2);r(),ge(Xe(5,Ji,e.touched&&e.invalid,e.touched&&e.invalid)),M("ngModel",a.formData.Email),m("disabled",!(a.roleService.users.View||a.roleService.profile.View)),r(4),m("ngIf",e.touched)}}function ln(n,l){n&1&&(i(0,"small",75),o(1,"*Enter a valid email address"),t())}function pn(n,l){if(n&1&&(F(0),d(1,ln,2,0,"small",74),A()),n&2){c();let e=B(2);r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function mn(n,l){if(n&1){let e=C();i(0,"div",25)(1,"input",76,4),I("ngModelChange",function(p){b(e);let s=c(2);return w(s.formData.Email,p)||(s.formData.Email=p),h(p)}),t(),i(3,"label",73),o(4,"Email"),t(),d(5,pn,2,1,"ng-container",7),t()}if(n&2){let e=B(2),a=c(2);r(),m("disabled",!(a.roleService.users.View||a.roleService.profile.View)),M("ngModel",a.formData.Email),r(4),m("ngIf",e.touched)}}function sn(n,l){n&1&&(i(0,"i",39),o(1," Password is required. "),t())}function cn(n,l){n&1&&(i(0,"i",39),o(1," These passwords don't match."),t())}function dn(n,l){if(n&1&&(i(0,"ul",77)(1,"li",78),o(2),t()()),n&2){let e=l.$implicit;r(2),g(e)}}function un(n,l){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=l.$implicit,a=l.index;r(2),g(a+1),r(2),g(e.Key),r(2),g(e.Value)}}function fn(n,l){if(n&1&&(i(0,"ul",77)(1,"li",78),o(2),t()()),n&2){let e=l.$implicit;r(2),g(e)}}function _n(n,l){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=l.$implicit,a=l.index;r(2),g(a+1),r(2),g(e.Key),r(2),g(e.Value)}}function gn(n,l){if(n&1&&(i(0,"div",81)(1,"div",82),o(2),t()()),n&2){let e=l.$implicit,a=l.index;r(),ge(L(3,Xi,a/4>=1)),r(),S(" ",e.Model," ")}}function bn(n,l){if(n&1&&(i(0,"div",59)(1,"div",79),o(2),t(),i(3,"div",44)(4,"div",20),d(5,gn,3,5,"div",80),t()()()),n&2){let e=l.$implicit;r(2),S(" ",e.Name," "),r(3),m("ngForOf",e.ListRole)}}function hn(n,l){if(n&1){let e=C();i(0,"button",85),x("click",function(){b(e);let p=c(3);return h(p.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=c(3);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientID)}}function xn(n,l){if(n&1){let e=C();i(0,"a",86),x("click",function(){b(e);let p=c(3);return h(p.preview("Profile/GenerateClientID"))}),o(1,"Generate"),t()}}function vn(n,l){if(n&1&&(i(0,"div",21)(1,"div",64),_(2,"input",65),t()()),n&2){let e=c(3);r(2),m("value",e.formData.ClientSecret)}}function Sn(n,l){if(n&1){let e=C();i(0,"button",85),x("click",function(){b(e);let p=c(3);return h(p.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=c(3);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientSecret)}}function Cn(n,l){if(n&1){let e=C();i(0,"a",86),x("click",function(){b(e);let p=c(3);return h(p.preview("Profile/GenerateClientSecret"))}),o(1,"Generate"),t()}}function yn(n,l){if(n&1&&(F(0),i(1,"div",61)(2,"h3"),o(3,"API Client ID"),t(),i(4,"small",83),o(5,"(developer.dealpos.com)"),t()(),i(6,"div",63)(7,"div",21)(8,"div",64),_(9,"input",65),t()(),i(10,"div",21)(11,"div",25),d(12,hn,2,2,"button",66)(13,xn,2,0,"a",67),t()()(),i(14,"div",61)(15,"h3"),o(16,"API Client Secret"),t(),i(17,"small",83),o(18,"(developer.dealpos.com)"),t()(),i(19,"div",63),d(20,vn,3,1,"div",84),i(21,"div",21)(22,"div",25),d(23,Sn,2,2,"button",66)(24,Cn,2,0,"a",67),t()()(),A()),n&2){let e=c(2);r(9),m("value",e.formData.ClientID),r(3),m("ngIf",e.formData.ClientID),r(),m("ngIf",e.roleService.users.View||e.roleService.profile.View),r(7),m("ngIf",e.formData.ClientSecret),r(3),m("ngIf",e.formData.ClientSecret),r(),m("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function Mn(n,l){n&1&&(i(0,"div",87)(1,"h4"),o(2," You have no access to view this info, please contact your administrator to view this tab information "),t()())}function wn(n,l){if(n&1){let e=C();i(0,"button",85),x("click",function(){b(e);let p=c(2);return h(p.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=c(2);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.OTTUrl)}}function In(n,l){if(n&1){let e=C();i(0,"a",86),x("click",function(){b(e);let p=c(2);return h(p.generateOTT("Profile/GenerateOneTimeToken"))}),o(1,"Generate"),t()}}function En(n,l){if(n&1){let e=C();i(0,"mainpanel-cmp",6)(1,"actions"),d(2,tn,2,1,"ng-container",7),t(),i(3,"content")(4,"div",8)(5,"div")(6,"ul",9)(7,"li",10)(8,"a",11),x("click",function(){b(e);let p=c();return h(p.onSelectTab("GENERAL"))}),o(9,"General"),t()(),i(10,"li",10)(11,"a",12),x("click",function(){b(e);let p=c();return h(p.onSelectTab("SECURITY"))}),o(12,"Security"),t()(),i(13,"li",10)(14,"a",13),x("click",function(){b(e);let p=c();return h(p.onSelectTab("ROLES"))}),o(15,"Roles"),t()(),i(16,"li",10)(17,"a",14),x("click",function(){b(e);let p=c();return h(p.onSelectTab("API"))}),o(18,"Developer API"),t()(),i(19,"li",10)(20,"a",15),x("click",function(){b(e);let p=c();return h(p.onSelectTab("TOTP"))}),o(21,"TOTP"),t()(),i(22,"li",10)(23,"a",16),x("click",function(){b(e);let p=c();return h(p.onSelectTab("OTT"))}),o(24,"One Time Token"),t()()(),i(25,"div",17)(26,"div",18)(27,"div",19)(28,"div",20)(29,"div",21)(30,"div",22)(31,"div",23)(32,"h2"),o(33,"General Credential"),t()(),i(34,"div",24)(35,"form",null,0)(37,"div",25)(38,"input",26),I("ngModelChange",function(p){b(e);let s=c();return w(s.formData.FirstName,p)||(s.formData.FirstName=p),h(p)}),t(),i(39,"label",27),o(40,"First Name"),t()(),i(41,"div",25)(42,"input",28),I("ngModelChange",function(p){b(e);let s=c();return w(s.formData.LastName,p)||(s.formData.LastName=p),h(p)}),t(),i(43,"label",29),o(44,"Last Name"),t()(),i(45,"div",25)(46,"input",30),I("ngModelChange",function(p){b(e);let s=c();return w(s.formData.LoginID,p)||(s.formData.LoginID=p),h(p)}),t(),i(47,"label",31),o(48,"Username"),t()(),d(49,rn,6,8,"div",32)(50,mn,6,3,"div",32),t()()()(),i(51,"div",21)(52,"div",22)(53,"div",23)(54,"h2"),o(55,"Change Password"),t(),i(56,"small",33),o(57,"Leave blank if you do not want to change"),t()(),i(58,"div",24)(59,"div")(60,"p-floatLabel")(61,"p-password",34,1),I("ngModelChange",function(p){b(e);let s=c();return w(s.formData.NewPassword,p)||(s.formData.NewPassword=p),h(p)}),t(),i(63,"label",35),o(64,"Password"),t()(),d(65,sn,2,0,"i",36),t(),i(66,"div",37)(67,"p-floatLabel")(68,"p-password",38,2),I("ngModelChange",function(p){b(e);let s=c();return w(s.formData.RePassword,p)||(s.formData.RePassword=p),h(p)}),t(),i(70,"label",35),o(71,"Re-Password"),t()(),d(72,cn,2,0,"i",39),t()()()()()()(),i(73,"div",40)(74,"div",41)(75,"div",42)(76,"h5",43),o(77,"Group"),t(),i(78,"i"),o(79,"Profile Groups"),t()(),i(80,"div",44)(81,"div",20),d(82,dn,3,1,"ul",45),t()()(),i(83,"div",46)(84,"div",47)(85,"h5",43),o(86,"Outlets"),t(),i(87,"i"),o(88,"Profile Outlets"),t()(),i(89,"div",44)(90,"div",20)(91,"div")(92,"table",48)(93,"thead",49)(94,"tr")(95,"th"),o(96,"No"),t(),i(97,"th"),o(98,"Outlet"),t(),i(99,"th"),o(100,"Access"),t()()(),i(101,"tbody"),d(102,un,7,3,"tr",50),t()()()()()()(),i(103,"div",51)(104,"div",41)(105,"div",42)(106,"h5",43),o(107,"Group"),t(),i(108,"i"),o(109,"Profile Groups"),t()(),i(110,"div",44)(111,"div",20),d(112,fn,3,1,"ul",45),t()()(),i(113,"div",46)(114,"div",47)(115,"h5",43),o(116,"Outlets"),t(),i(117,"i"),o(118,"Profile Outlets"),t()(),i(119,"div",44)(120,"div",20)(121,"div")(122,"table",48)(123,"thead",49)(124,"tr")(125,"th"),o(126,"No"),t(),i(127,"th"),o(128,"Outlet"),t(),i(129,"th"),o(130,"Access"),t()()(),i(131,"tbody"),d(132,_n,7,3,"tr",50),t()()()()()()(),i(133,"div",52),d(134,bn,6,2,"div",53),t(),i(135,"div",54),d(136,yn,25,6,"ng-container",55)(137,Mn,3,0,"ng-template",null,3,de),t(),i(139,"div",56),_(140,"POS-setup-2FA",57),t(),i(141,"div",58)(142,"div",59)(143,"div",60)(144,"div",61)(145,"h3"),o(146,"One Time Token"),t(),i(147,"small",62),o(148,"*Token will expire in 1 hour"),t()(),i(149,"div",63)(150,"div",21)(151,"div",64),_(152,"input",65),t()(),i(153,"div",21)(154,"div",25),d(155,wn,2,2,"button",66)(156,In,2,0,"a",67),t()(),i(157,"div",60)(158,"small",68),o(159," Please refer this "),i(160,"a",69),o(161,"article"),t(),o(162," for more information "),t()()()()()()()()()()()}if(n&2){let e=B(62),a=B(69),p=B(138),s=c();m("pageData",s.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(2),m("ngIf",s.activeTab=="GENERAL"),r(6),m("ngClass",L(38,jt,s.activeTab=="GENERAL")),r(3),m("ngClass",L(40,jt,s.activeTab=="SECURITY")),r(15),m("ngClass",L(42,jt,s.activeTab=="GENERAL")),r(12),M("ngModel",s.formData.FirstName),m("disabled",!(s.roleService.users.View||s.roleService.profile.View)),r(4),M("ngModel",s.formData.LastName),m("disabled",!(s.roleService.users.View||s.roleService.profile.View)),r(4),M("ngModel",s.formData.LoginID),m("disabled",!(s.roleService.users.View||s.roleService.profile.View)),r(3),m("ngIf",s.data.EmailRequired),r(),m("ngIf",!s.data.EmailRequired),r(11),m("toggleMask",!0)("feedback",!1)("disabled",!(s.roleService.users.View||s.roleService.profile.View)),M("ngModel",s.formData.NewPassword),m("ngClass",L(44,Ri,e.touched&&e.invalid)),r(4),m("ngIf",(e.touched||a.dirty)&&e.invalid),r(3),M("ngModel",s.formData.RePassword),m("toggleMask",!0)("feedback",!1)("disabled",!(s.roleService.users.View||s.roleService.profile.View))("ngClass",L(46,Ri,s.formData.NewPassword!=s.formData.RePassword&&(a.touched||a.dirty))),r(4),Kt(s.formData.NewPassword!=s.formData.RePassword&&(a.touched||a.dirty)?72:-1),r(10),m("ngForOf",s.data.Security.Groups),r(20),m("ngForOf",s.data.Security.Outlets),r(10),m("ngForOf",s.data.Security.Groups),r(20),m("ngForOf",s.data.Security.Outlets),r(2),m("ngForOf",s.data.Role),r(2),m("ngIf",s.roleService.developer.Api)("ngIfElse",p),r(4),m("totpEnabled",s.totpEnabled),r(12),m("value",s.formData.OneTimeToken),r(3),m("ngIf",s.formData.OneTimeToken),r(),m("ngIf",s.roleService.users.View||s.roleService.profile.View)}}var ft=class n extends ct{constructor(e,a,p,s,E,q,N){super(e,a,"Profile/MyProfileFormInitial",p);this.toastr=s;this.dialog=E;this.authenticatorService=q;this.roleService=N}tooltipText="Copy to Clipboard";totpEnabled;activeTab="GENERAL";postBindForm(e){this.totpEnabled=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.",V.Error);return}this.onSubmit("Profile/SubmitProfile")}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",V.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form=a},error:a=>{this.toastr.error(a,V.Error)}})}copyToClipboard(){this.tooltipText="Token has been copied to clipboard",setTimeout(()=>{this.tooltipText="Copy to Clipboard"},2e3)}onSelectTab(e){this.activeTab=e}generateOTT(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form.OneTimeToken=a.OneTimeToken,this.data.Form.OTTUrl="https://"+window.location.hostname+`?OTT=${this.data.Form.OneTimeToken}`},error:a=>{this.toastr.error(a,V.Error)}})}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(it),u(H),u(le),u(rt),u(at))};static \u0275cmp=y({type:n,selectors:[["POS-my-profile"]],features:[ae],decls:1,vars:1,consts:[["validation","ngForm"],["password","ngModel"],["rePassword","ngModel"],["REQUIRED_ROLE_API",""],["email","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[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,"form-floating-outline"],["type","text","id","inputFirstName","name","firstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputFirstName"],["type","text","id","inputLastName","name","lastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputLastName"],["type","text","id","inputName","name","userName","placeholder","Username",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputName"],["class","form-floating-outline",4,"ngIf"],[1,"text-body-secondary","h6"],["required","",1,"p-change-password",3,"ngModelChange","toggleMask","feedback","disabled","ngModel","ngClass"],["for","password"],["class","control-label text-danger",4,"ngIf"],[1,"mt-6"],[1,"p-change-password",3,"ngModelChange","ngModel","toggleMask","feedback","disabled","ngClass"],[1,"control-label","text-danger"],["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"],["class","mb-4",4,"ngFor","ngForOf"],[1,"row","border-bottom","mt-10","ms-3"],[1,"col-sm-2"],[1,"table"],[1,"thead-light","sticky-top-thead"],[4,"ngFor","ngForOf"],["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"],["class","row pt-8 ms-3 me-3",4,"ngFor","ngForOf"],["id","developerApi","role","tab",1,"tab-pane","fade","show","border","border-top-0","p-5","mt-0"],[4,"ngIf","ngIfElse"],["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,"row","pt-8","ms-3","me-3"],[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"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken","class","btn btn-secondary btn-sm me-5",3,"matTooltip","cdkCopyToClipboard","click",4,"ngIf"],["class","btn btn-success btn-sm","role","button",3,"click",4,"ngIf"],[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","class","btn btn-success","role","button",3,"disabled","click",4,"ngIf"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"click","disabled"],["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",3,"ngModelChange","ngModel","disabled"],["for","email"],["class","text-danger",4,"ngIf"],[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",3,"ngModelChange","disabled","ngModel"],[1,"mb-4"],[2,"list-style","circle"],[1,"col-sm-2","border","fw-bold","p-3","text-center",2,"background-color","#f6f6f6"],["class","col-md-3 px-0",4,"ngFor","ngForOf"],[1,"col-md-3","px-0"],[1,"p-3","border","border-start-0"],[1,"text-body-secondary","h6","ms-2"],["class","col-sm-6",4,"ngIf"],["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,"d-flex","justify-content-center","align-items-center","p-12"]],template:function(a,p){a&1&&d(0,En,163,48,"mainpanel-cmp",5),a&2&&m("ngIf",p.data&&p.formData)},dependencies:[et,$,O,Ce,z,R,Se,Pe,nt,j,De,ee,be,ki,Ai,Ii,ut],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}"]})};var Tn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],Dn=n=>({ID:n});function Pn(n,l){n&1&&(i(0,"th",22),o(1," @@ Cost "),t())}function On(n,l){if(n&1&&(i(0,"span",39),o(1),f(2,"number"),t()),n&2){let e=c().$implicit;r(),g(" - Profit: "+v(2,1,e.Profit))}}function Nn(n,l){if(n&1&&(i(0,"small"),o(1),t()),n&2){let e=c(2).$implicit;r(),S("( ",e.Commissions[0].Quantity," unit )")}}function kn(n,l){if(n&1&&(i(0,"i",52),o(1),d(2,Nn,2,1,"small",53),t()),n&2){let e=c().$implicit;r(),S("sold by ",e.Commissions[0].SalesName," "),r(),m("ngIf",e.Commissions[0].Quantity<e.Quantity)}}function Fn(n,l){if(n&1&&(i(0,"li")(1,"i"),o(2),t()()),n&2){let e=l.$implicit;r(2),S("( ",e.Quantity+" unit by "+e.SalesName," )")}}function An(n,l){if(n&1&&(i(0,"ul",54)(1,"li")(2,"i"),o(3,"sold by"),t()(),d(4,Fn,3,1,"li",19),t()),n&2){let e=c().$implicit;r(4),m("ngForOf",e.Commissions)}}function Vn(n,l){if(n&1&&(i(0,"th",55),o(1),f(2,"number"),t()),n&2){let e=c().$implicit;r(),g(v(2,1,e.UnitCost))}}function Rn(n,l){if(n&1&&(i(0,"tr")(1,"th",40)(2,"div")(3,"span",41),o(4),t(),d(5,kn,3,2,"i",42)(6,An,5,1,"ul",43),_(7,"span",44),f(8,"newlines"),t()(),i(9,"th",45),o(10),t(),i(11,"th",46),o(12),f(13,"number"),t(),i(14,"th",47),o(15),t(),d(16,Vn,3,3,"th",48),i(17,"th",49),o(18),f(19,"number"),t(),i(20,"th",50),o(21),t(),i(22,"th",51),o(23),f(24,"number"),t()()),n&2){let e=l.$implicit,a=c(3);r(4),g(e.Name),r(),m("ngIf",e.Commissions.length==1),r(),m("ngIf",e.Commissions.length>1),r(),m("innerHTML",v(8,11,e.Note),P),r(3),g(e.Code),r(2),g(v(13,13,e.Quantity)),r(3),g(e.UOMName),r(),m("ngIf",a.roleService.product.Cost),r(2),g(v(19,15,e.UnitPrice)),r(3),g(e.Discount==0?"":e.Discount+"%"),r(2),g(v(24,17,e.Total))}}function Bn(n,l){if(n&1&&(i(0,"tr")(1,"th",56),o(2,"\xA0"),t(),_(3,"th",57)(4,"th",58)(5,"th",59)(6,"th",16),i(7,"th",60),o(8),t(),i(9,"th",61),o(10),t(),i(11,"th",62),o(12),f(13,"number"),t()()),n&2){let e=l.$implicit;r(8),S("",e.Label," :"),r(2),g(e.CurrencySymbol),r(2),g(v(13,3,e.Amount))}}function Ln(n,l){if(n&1&&(i(0,"div")(1,"div",23)(2,"div",24)(3,"a",25),_(4,"span",26),f(5,"date"),_(6,"small",27),f(7,"date"),t(),i(8,"span"),o(9),f(10,"showIfNotNullOrEmptyString"),t(),_(11,"span",28),i(12,"strong",29),o(13),f(14,"sum"),f(15,"number"),i(16,"span"),o(17),f(18,"showIfNotNullOrEmptyString"),t()(),d(19,On,3,3,"span",30),i(20,"i",31),o(21),t(),i(22,"span",32),o(23),t(),i(24,"span",33),o(25),t()(),i(26,"div",34),_(27,"label",35),t()(),i(28,"table",36),_(29,"thead"),i(30,"tbody",37),d(31,Rn,25,19,"tr",19),t()(),i(32,"table",38),d(33,Bn,14,5,"tr",19),t()()),n&2){let e=l.$implicit,a=c(2);r(3),m("routerLink",Je(31,Tn))("queryParams",L(32,Dn,e.ID)),r(),m("innerHTML",e.EntityName+" #"+e.Number+" - "+D(5,14,e.Date,"dd MMM yyyy"),P),r(2),m("innerHTML","("+D(7,17,e.Created,"HH:mm")+")",P),r(3),g(D(10,20,e.CustomerNameDisplay," - {0}")),r(4),S(" ","[Q: "+D(14,23,e.Items,"Quantity")+", T: "+v(15,26,e.Final)+"]"," "),r(4),g(D(18,28,e.SalesName," - Sales: {0}")),r(2),m("ngIf",a.roleService.report.Profit),r(2),g(e.DeliveryOutlet==null?"":": Delivered from "+e.DeliveryOutlet),r(2),g(e.PromotionCoupon==null?"":": "+e.PromotionCoupon),r(2),g(e.SONote==null?"":": "+e.SONote),r(2),m("innerHTML",e.PaymentStateLabel,P),r(4),m("ngForOf",e.Items),r(2),m("ngForOf",e.Aggregate)}}function Hn(n,l){if(n&1&&(i(0,"div")(1,"strong"),o(2,"Cost ("),_(3,"span",67),f(4,"number"),o(5,"%)"),t(),_(6,"span",65),f(7,"number"),t()),n&2){let e=c(3);r(3),m("innerHTML",v(4,2,e.data.Aggregate.CostRatio),P),r(3),m("innerHTML",v(7,4,e.data.Aggregate.Cost),P)}}function jn(n,l){if(n&1&&(i(0,"div")(1,"strong")(2,"span"),o(3,"Profit"),t(),o(4," ("),_(5,"span",67),f(6,"number"),o(7,"%)"),t(),_(8,"span",65),f(9,"number"),t()),n&2){let e=c(3);r(5),m("innerHTML",v(6,2,e.data.Aggregate.ProfitRatio),P),r(3),m("innerHTML",v(9,4,e.data.Aggregate.Profit),P)}}function Wn(n,l){if(n&1&&(i(0,"div",63)(1,"div",64)(2,"div")(3,"strong"),o(4,"Tax Added"),t(),_(5,"span",65),f(6,"number"),t(),i(7,"div")(8,"strong"),o(9,"Sales with Tax"),t(),_(10,"span",65),f(11,"number"),t()(),i(12,"div",66)(13,"div")(14,"strong"),o(15,"Orders"),t(),_(16,"span",65),f(17,"number"),t(),i(18,"div")(19,"strong"),o(20,"Qty"),t(),_(21,"span",65),f(22,"number"),t()(),i(23,"div",66)(24,"div")(25,"strong"),o(26,"Gross Sales"),t(),_(27,"span",65),f(28,"number"),t(),i(29,"div")(30,"strong"),o(31,"Discount"),t(),_(32,"span",65),f(33,"number"),t(),i(34,"div")(35,"strong"),o(36,"Tax Incl."),t(),_(37,"span",65),f(38,"number"),t(),i(39,"div")(40,"strong"),o(41,"Net Sales"),t(),_(42,"span",65),f(43,"number"),t(),d(44,Hn,8,6,"div",53)(45,jn,10,6,"div",53),t()()),n&2){let e=c(2);r(5),m("innerHTML",v(6,10,e.data.Aggregate.TaxAdd),P),r(5),m("innerHTML",v(11,12,e.data.Aggregate.SalesWithTax),P),r(6),m("innerHTML",v(17,14,e.data.Aggregate.Orders),P),r(5),m("innerHTML",v(22,16,e.data.Aggregate.ItemsQuantity),P),r(6),m("innerHTML",v(28,18,e.data.Aggregate.GrossItems),P),r(5),m("innerHTML",v(33,20,e.data.Aggregate.Discount),P),r(5),m("innerHTML",v(38,22,e.data.Aggregate.TaxInclude),P),r(5),m("innerHTML",v(43,24,e.data.Aggregate.SalesWithoutTax),P),r(2),m("ngIf",e.roleService.product.Cost),r(),m("ngIf",e.roleService.report.Profit)}}function Un(n,l){if(n&1){let e=C();i(0,"mainpanel-cmp",1),x("onSubmit",function(){b(e);let p=c();return h(p.searchFromPageOne())}),i(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),o(6,"Type"),t(),i(7,"ng-select",4),I("ngModelChange",function(p){b(e);let s=c();return w(s.pageData.Filter.TypeID,p)||(s.pageData.Filter.TypeID=p),h(p)}),t()(),i(8,"div")(9,"h6"),o(10,"Customer"),t(),i(11,"autocompleteV2",5),x("onInputChange",function(p){b(e);let s=c();return h(s.resetCustomer(p))})("onSelect",function(p){b(e);let s=c();return h(s.onSelectCustomer(p))}),t()(),i(12,"div")(13,"h6"),o(14,"From"),t(),i(15,"datepicker",6),I("dateChange",function(p){b(e);let s=c();return w(s.pageData.Filter.From,p)||(s.pageData.Filter.From=p),h(p)}),t()(),i(16,"div")(17,"h6"),o(18,"To"),t(),i(19,"datepicker",7),I("dateChange",function(p){b(e);let s=c();return w(s.pageData.Filter.To,p)||(s.pageData.Filter.To=p),h(p)}),t()()()()(),i(20,"content")(21,"div",8)(22,"table",9)(23,"thead",10)(24,"tr")(25,"th",11),o(26," Name "),t(),i(27,"th",12),o(28," Code "),t(),i(29,"th",13),o(30," Qty "),t(),i(31,"th",14),o(32," UOM "),t(),d(33,Pn,2,0,"th",15),i(34,"th",16),o(35," @@ Price "),t(),i(36,"th",17),o(37," % "),t(),i(38,"th",18),o(39," Total "),t()()()(),d(40,Ln,34,34,"div",19)(41,Wn,46,26,"div",20),i(42,"POS-complex-pagination",21),x("jumpToPage",function(){b(e);let p=c();return h(p.getListData())})("previousPage",function(){b(e);let p=c();return h(p.getListData())})("nextPage",function(){b(e);let p=c();return h(p.getListData())}),t()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0),r(7),m("items",e.pageData.Options.Types),M("ngModel",e.pageData.Filter.TypeID),r(8),M("date",e.pageData.Filter.From),r(4),M("date",e.pageData.Filter.To),r(14),m("ngIf",e.roleService.product.Cost),r(7),m("ngForOf",e.data.Data),r(),m("ngIf",e.data.Data&&e.data.Data.length>0),r(),m("total",e.data.Data?e.data.Data.length:0)("pageData",e.pageData)}}var gt=class n extends Oe{constructor(e,a,p){super(e,a,"Report/MySales","ReportLoader/MyActivity");this.roleService=p}onSelectCustomer(e){this.pageData.Filter.CustomerID=e}resetCustomer(e){e==""&&(this.pageData.Filter.CustomerID=null)}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(at))};static \u0275cmp=y({type:n,selectors:[["POS-my-sales"]],features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"onSubmit","pageData","hideSearchBox"],[1,"d-flex"],["container",""],["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,"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","class","text-end","style","width: 80px",4,"ngIf"],[1,"text-end",2,"width","80px"],[1,"red",2,"width","30px"],[1,"text-end",2,"width","90px"],[4,"ngFor","ngForOf"],["class","clearfix mb-5 mt-5",4,"ngIf"],["api","Report/ReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["id","thCost",1,"text-end",2,"width","80px"],[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"],["class","fw-bold",4,"ngIf"],["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,"table","table-sm","table-borderless","d-flex","justify-content-end","mt-3"],[1,"fw-bold"],[2,"width","726px"],[1,"fw-normal"],["class","text-warning inlineMarginLeft",4,"ngIf"],["class","list-inline text-warning inlineMarginLeft",4,"ngIf"],[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"],["class","fw-normal text-end","style","width: 80px",4,"ngIf"],[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-warning","inlineMarginLeft"],[4,"ngIf"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"fw-normal","text-end",2,"width","80px"],[2,"width","645px"],[2,"width","75px"],[2,"width","30px"],[2,"width","40px"],[1,"text-end",2,"width","130px"],[1,"fw-normal","text-end",2,"width","20px"],[1,"fw-normal","text-end","pe3",2,"width","60px"],[1,"clearfix","mb-5","mt-5"],[1,"zebra",2,"float","right"],[1,"text-end",3,"innerHTML"],[1,"zebra",2,"float","right","margin-right","20px"],[1,"Percentage",3,"innerHTML"]],template:function(a,p){a&1&&d(0,Un,43,11,"mainpanel-cmp",0),a&2&&m("ngIf",p.data)},dependencies:[$,O,R,j,Te,ee,ke,Ne,Ti,Si,re,Z,mt,bi,hi]})};function Zn(n,l){n&1&&(i(0,"small",17),o(1,"*Enter a valid phone number"),t())}function zn(n,l){if(n&1&&(F(0),d(1,Zn,2,0,"small",16),A()),n&2){c();let e=B(9);r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function Gn(n,l){n&1&&(i(0,"small",17),o(1,"*Enter a valid email address"),t())}function qn(n,l){if(n&1&&(F(0),d(1,Gn,2,0,"small",16),A()),n&2){c();let e=B(16);r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}var bt=class n{constructor(l,e,a,p,s){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=p;this.router=s;this.config.title="Subscribe Account Info",this.config.okText="I want to subscribe",this.config.cancelText="Cancel",this.config.customWidth="35vw"}config=new Y;onOk(l){if(l!=="Enter"){if(this.data.form.Qty==0){this.toastr.error("The number of outlets can't be empty",V.Error),this.dialogRef.close();return}this.httpService.post("/API/Subscription/SendSubscription",this.data.form).subscribe(e=>{this.toastr.success(e,V.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}static \u0275fac=function(e){return new(e||n)(u(T),u(Q),u(ie),u(H),u(ve))};static \u0275cmp=y({type:n,selectors:[["POS-modal-subscribe"]],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"],[4,"ngIf"],["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"],["class","text-danger",4,"ngIf"],[1,"text-danger"]],template:function(e,a){if(e&1){let p=C();i(0,"modal-material",3),x("onOk",function(E){return b(p),h(a.onOk(E))})("onCancel",function(){return b(p),h(a.dialogRef.close())})("onClose",function(){return b(p),h(a.dialogRef.close())}),i(1,"content")(2,"div",4)(3,"form",null,0)(5,"div",5)(6,"div",6)(7,"div",7)(8,"input",8,1),I("ngModelChange",function(E){return b(p),w(a.data.form.Phone,E)||(a.data.form.Phone=E),h(E)}),t(),i(10,"label",9),o(11,"Phone*"),t(),d(12,zn,2,1,"ng-container",10),t()(),i(13,"div",6)(14,"div",7)(15,"input",11,2),I("ngModelChange",function(E){return b(p),w(a.data.form.Email,E)||(a.data.form.Email=E),h(E)}),t(),i(17,"label",12),o(18,"Email*"),t(),d(19,qn,2,1,"ng-container",10),t()()(),i(20,"div",5)(21,"div",13)(22,"div",7)(23,"textarea",14),I("ngModelChange",function(E){return b(p),w(a.data.form.Note,E)||(a.data.form.Note=E),h(E)}),t(),i(24,"label",15),o(25,"Note"),t()()()()()()()()}if(e&2){let p=B(9),s=B(16);m("dynamicValidated",(p==null?null:p.valid)||(s==null?null:s.valid))("config",a.config),r(8),M("ngModel",a.data.form.Phone),r(4),m("ngIf",p.touched&&p.dirty),r(3),M("ngModel",a.data.form.Email),r(4),m("ngIf",s.touched&&s.dirty),r(4),M("ngModel",a.data.form.Note)}},dependencies:[O,Ce,z,R,Se,Pe,nt,j,De,K,be]})};function $n(n,l){if(n&1){let e=C();i(0,"div",23),x("click",function(){let p=b(e).$implicit,s=c(2);return h(s.onCycleChange(p.key))}),i(1,"div",24)(2,"span",25),o(3),t(),_(4,"div",26),t()()}if(n&2){let e=l.$implicit,a=c(2);ge(e.key==a.formData.Cycle?"active":""),r(3),g(e.dicount),r(),m("innerHTML",e.desc,P)}}function Qn(n,l){if(n&1){let e=C();i(0,"tr")(1,"th",27),o(2,"Register"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"input",28),I("ngModelChange",function(p){b(e);let s=c(2);return w(s.formData.Register,p)||(s.formData.Register=p),h(p)}),x("ngModelChange",function(){b(e);let p=c(2);return h(p.onQtyRegisterChange())}),t(),i(7,"span"),o(8),f(9,"number"),t()()()}if(n&2){let e=c(2);r(6),m("preventNegative",!0),M("ngModel",e.formData.Register),r(2),S("/ ",v(9,3,e.data.Options.Register),"")}}function Yn(n,l){if(n&1){let e=C();i(0,"div",7)(1,"div",29)(2,"div",9)(3,"h2",10),o(4,"Setup Fee "),t(),i(5,"small",11),o(6,"(One-time payment)"),t()()(),i(7,"div",30)(8,"table",31)(9,"tr")(10,"th"),o(11,"POS"),t(),i(12,"td"),o(13,"\xA0:"),t(),i(14,"td")(15,"label",32)(16,"radio-options",33),I("modelChange",function(p){b(e);let s=c(2);return w(s.data.Options.SetupFee,p)||(s.data.Options.SetupFee=p),h(p)}),x("modelChange",function(){b(e);let p=c(2);return h(p.calculateSetupFee())}),t()()()()()()()}if(n&2){let e=c(2);r(16),M("model",e.data.Options.SetupFee)}}function Kn(n,l){n&1&&(F(0),o(1,"s "),A())}function Jn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),o(3,"Additional Register"),t(),i(4,"p")(5,"small",40),o(6),t()()(),i(7,"td",36),o(8),t(),i(9,"td",37),_(10,"span",39),o(11),f(12,"number"),t(),i(13,"td",38),o(14),t(),i(15,"td",37),_(16,"span",39),o(17),f(18,"number"),t()()),n&2){let e=c(4);r(6),Ie("",e.formData.Register," Register",e.formData.Register>1?"s":""," "),r(2),g(e.formData.Cycle),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),g(v(12,8,e.data.Options.Register)),r(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),g(v(18,10,e.registerFee))}}function Xn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong")(3,"span"),o(4,"POS"),t()(),i(5,"p")(6,"small",40),o(7," - Consultation "),_(8,"br"),o(9," - Training 2x "),_(10,"br"),o(11," - 1 Month Support Group"),t()()(),_(12,"td",36),i(13,"td",37)(14,"span"),o(15,"IDR "),t(),o(16),f(17,"number"),t(),_(18,"td",38),i(19,"td",37)(20,"span"),o(21,"IDR "),t(),o(22),f(23,"number"),t()()),n&2){let e=c(4);r(16),g(v(17,2,e.formData.Setup)),r(6),g(v(23,4,e.formData.Setup))}}function eo(n,l){if(n&1&&(F(0),i(1,"tr")(2,"td")(3,"strong"),_(4,"span",39),t(),i(5,"p")(6,"small",40),o(7),d(8,Kn,2,0,"ng-container",17),t()()(),i(9,"td",36),o(10),t(),i(11,"td",37),_(12,"span",39),o(13),f(14,"number"),t(),i(15,"td",38),o(16),t(),i(17,"td",37),_(18,"span",39),o(19),f(20,"number"),t()(),d(21,Jn,19,12,"tr",17)(22,Xn,24,6,"tr",17),A()),n&2){let e=c(3);r(4),m("innerHTML",e.formData.Type==1?"Starter Subscription":"Standard Subscription",P),r(3),S(" ",e.formData.Qty," Outlet"),r(),m("ngIf",e.formData.Qty>1),r(2),g(e.formData.Cycle),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),g(v(14,11,e.data.Options.Type)),r(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),g(v(20,13,e.outletFee)),r(2),m("ngIf",e.formData.Register>0),r(),m("ngIf",e.data.Options.SetupFee)}}function to(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Sub Total"),t(),i(3,"td",43),o(4,":"),t(),i(5,"td",37)(6,"strong"),_(7,"span",39),o(8),f(9,"number"),t()()()),n&2){let e=c(4);r(7),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),g(v(9,2,e.subTotal))}}function io(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Tax (11%)"),t(),i(3,"td",43),o(4,":"),t(),i(5,"td",37)(6,"strong"),_(7,"span",39),o(8),f(9,"number"),t()()()),n&2){let e=c(4);r(7),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),g(v(9,2,e.subTotal*.11))}}function no(n,l){if(n&1&&(F(0),i(1,"div",41)(2,"table",42),d(3,to,10,4,"tr",17)(4,io,10,4,"tr",17),i(5,"tr")(6,"th"),o(7,"Total"),t(),i(8,"td",43),o(9,":"),t(),i(10,"td",37)(11,"strong"),_(12,"span",39),o(13),f(14,"number"),t()()()()(),A()),n&2){let e=c(3);r(3),m("ngIf",e.data.vatEnabled),r(),m("ngIf",e.data.vatEnabled),r(8),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),S("",v(14,4,e.subTotal+(e.data.vatEnabled?e.subTotal*.11:0)),`
|
|
3
|
+
`)}}function oo(n,l){if(n&1&&(i(0,"div",30)(1,"table",34)(2,"thead",35)(3,"tr")(4,"th"),o(5,"Product"),t(),i(6,"th",36),o(7,"Month"),t(),i(8,"th",37),o(9,"Price"),t(),i(10,"th",38),o(11,"Disc"),t(),i(12,"th",37),o(13,"Total"),t()()(),i(14,"tbody"),d(15,eo,23,15,"ng-container",17),t()(),d(16,no,15,6,"ng-container",17),t()),n&2){let e=c(2);r(15),m("ngIf",(e.formData==null?null:e.formData.Qty)>0),r(),m("ngIf",(e.formData==null?null:e.formData.Qty)>0)}}function ao(n,l){n&1&&(i(0,"div",7)(1,"div",29)(2,"h2"),o(3,'Your payment currency is "IDR"'),t()(),i(4,"div",30)(5,"div",44)(6,"div",45)(7,"h2",46)(8,"button",47),o(9," I Want to pay in USD "),t()(),i(10,"div",48)(11,"div",49)(12,"ol",50)(13,"li",51),o(14," Go to setup menu"),t(),i(15,"li",51),o(16," Click tab currency"),t(),i(17,"li",51),o(18," Select the currency you want to make for payment"),t(),i(19,"li",51),o(20," Select Yes at primary currency box and click save"),t(),i(21,"li",52),o(22," Then you can check to my subscribe again "),t()(),i(23,"p",53),o(24,"For more detailed information, please check the following article: "),i(25,"a",54),o(26,"Added Currency Conversion"),t()()()()()()()())}function ro(n,l){if(n&1){let e=C();i(0,"mainpanel-cmp",2)(1,"actions")(2,"button",3),x("click",function(){b(e);let p=c();return h(p.onOpenSubscribeDialog())}),o(3,"Subscribe Now"),t()(),i(4,"content")(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"h2",10),o(12,"Subscribe "),t(),i(13,"small",11),o(14,"(Recurring)"),t()(),i(15,"a",12),x("click",function(){b(e);let p=c();return h(p.showRegister=!p.showRegister)}),o(16,"More"),t()(),i(17,"div",13)(18,"table",14)(19,"tr")(20,"th"),o(21,"Outlets"),t(),i(22,"td"),o(23,":"),t(),i(24,"td")(25,"input",15,0),I("ngModelChange",function(p){b(e);let s=c();return w(s.formData.Qty,p)||(s.formData.Qty=p),h(p)}),x("ngModelChange",function(){b(e);let p=c();return h(p.onQtyOutletChange())}),t(),i(27,"span"),o(28),f(29,"number"),t()()(),i(30,"tr")(31,"th"),o(32,"Cycle"),t(),i(33,"td"),o(34,":"),t(),i(35,"td"),d(36,$n,5,4,"div",16),t()(),d(37,Qn,10,5,"tr",17),t()()(),d(38,Yn,17,1,"div",18),t(),i(39,"div",19)(40,"div",7)(41,"div",20),x("click",function(){b(e);let p=c();return h(p.invoice=!p.invoice)}),i(42,"h2",21),o(43,"Invoice Preview"),t()(),d(44,oo,17,2,"div",22),t(),d(45,ao,27,0,"div",18),t()()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("hideMenu",!0),r(2),m("disabled",e.formData.Qty==0),r(23),m("preventNegative",!0),M("ngModel",e.formData.Qty),r(3),S("/ ",v(29,13,e.data.Type[0].amount),""),r(8),m("ngForOf",e.data.DiscountOptions),r(),m("ngIf",e.showRegister),r(),m("ngIf",e.data.Options.Setup),r(6),m("ngIf",e.invoice),r(),m("ngIf",e.data.Options.Setup)}}var ht=class n extends ct{constructor(e,a,p,s){super(e,a,"Subscription/MySubscriptionLoader",p);this.matDialog=s}showRegister=!1;invoice=!0;outletFee=0;registerFee=0;subTotal=0;postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(bt,{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 a=e*this.formData.Discount/100;this.registerFee=e-a}else this.registerFee=e}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(it),u(le))};static \u0275cmp=y({type:n,selectors:[["POS-choose-plan"]],features:[ae],decls:1,vars:1,consts:[["outletQty","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu",4,"ngIf"],[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"],["class","card border-dark align-text-top d-inline-block me-1 mb-0",3,"class","click",4,"ngFor","ngForOf"],[4,"ngIf"],["class","card",4,"ngIf"],[1,"col-md-7"],[1,"card-header",3,"click"],[1,"title"],["class","card-body",4,"ngIf"],[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,"card-body"],[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"],[3,"innerHTML"],[2,"font-size","90% !important"],[1,"d-flex","justify-content-end"],[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(a,p){a&1&&d(0,ro,46,15,"mainpanel-cmp",1),a&2&&m("ngIf",p.data&&p.formData)},dependencies:[$,O,z,R,pi,j,ee,gi,Mi,be,re],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})};var xt=class n{constructor(l,e,a){this.dialogRef=l;this.data=e;this.router=a;this.config.title=this.data.title,this.config.okText="Yes",this.config.cancelText="No"}config=new Y;onOk(){this.router.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"]),this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)(u(Q),u(ie),u(ve))};static \u0275cmp=y({type:n,selectors:[["POS-modal-choose-plan"]],decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"text-center",2,"width","440px"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"h4",1),o(3),i(4,"span"),o(5,"Do you want to Choose your Plan ?"),t()()()()),e&2&&(m("config",a.config),r(3),S(" ",a.data.body," "))},dependencies:[K]})};var vt=class n{constructor(l,e,a,p){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=p;this.config.title="Confim Adjusted Subscription"}message="";config=new Y;onOk(){let l={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",V.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Confirm",l).subscribe(e=>{this.toastr.success(e.Message,V.Success),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(u(T),u(Q),u(ie),u(H))};static \u0275cmp=y({type:n,selectors:[["POS-modal-confirm-adjusted-plan"]],decls:8,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"font-weight","h4","mb-5"],[1,"form-floating-outline"],["name","address","id","inputAddress","placeholder","Address","matTooltipPosition","above","matTooltip","Address","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","inputAddress"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"p",1),o(3," Do you agree about billing adjusted? "),t(),i(4,"div",2)(5,"textarea",3),I("ngModelChange",function(s){return w(a.message,s)||(a.message=s),s}),t(),i(6,"label",4),o(7,"Reason"),t()()()()),e&2&&(m("config",a.config),r(5),M("ngModel",a.message))},dependencies:[z,R,Pe,j,K,be]})};var Ae=class n{constructor(l,e,a,p){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=p;this.config.title="Stop Subscription",this.config.customWidth="450px"}message="";config=new Y;onOk(){let l={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",V.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",l).subscribe(e=>{this.toastr.success(e.Message,V.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(u(T),u(Q),u(ie),u(H))};static \u0275cmp=y({type:n,selectors:[["POS-modal-stop-subscription"]],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,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"textarea",2),I("ngModelChange",function(s){return w(a.message,s)||(a.message=s),s}),t(),i(4,"label",3),o(5,"Reason"),t()()()()),e&2&&(m("config",a.config),r(3),M("ngModel",a.message))},dependencies:[z,R,j,K]})};var Ve=class n{apiUrl="https://app.midtrans.com/snap/snap.js";injected=!1;initScript(){return new Ue(l=>{let e;this.injected||(e=document.createElement("script"),e.src=this.apiUrl,e.async=!0,e.setAttribute("data-client-key",je.midtransClientKey),this.injected=!0,document.body.appendChild(e))})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var lo=()=>["/menu/Profile/Main/My_Subscription/Choose_your_plan"],po=(n,l)=>({"bg-warning":n,"bg-danger":l}),mo=n=>({"background-color":n}),so=n=>({"bg-gradient-warning":n});function co(n,l){n&1&&(i(0,"a",35),o(1,"Choose Your Plan"),t()),n&2&&m("routerLink",Je(1,lo))}function uo(n,l){if(n&1&&(i(0,"div",16),o(1),f(2,"date"),t()),n&2){let e=c(2);r(),S(" ",D(2,1,e.data.Zoho.Subscription.Since,"dd MMM yyyy")," ")}}function fo(n,l){if(n&1&&(i(0,"div",36)(1,"div",37)(2,"h5",13),o(3," Subscription "),t(),i(4,"div",16),o(5),t()()()),n&2){let e=c(2);r(),ge(Xe(3,po,e.data.Zoho.Subscription.SubscriptionState=="SellOnly"||e.data.Zoho.Subscription.SubscriptionState=="Overdue",e.data.Zoho.Subscription.SubscriptionState=="Suspended")),r(4),S(" ",e.data.Zoho.Subscription.SubscriptionState," ")}}function _o(n,l){if(n&1&&(i(0,"span",42),o(1),f(2,"number"),t()),n&2){let e=c(3);r(),S("",v(2,1,e.data.Zoho.Subscription.Discount)," %")}}function go(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),f(3,"number"),t(),_(4,"br"),t()),n&2){let e=c(3);r(2),g(v(3,1,e.data.Zoho.Subscription.TotalAmount))}}function bo(n,l){if(n&1&&(i(0,"div",6)(1,"div",7)(2,"h2"),o(3,"Current Plan"),t()(),i(4,"div",28)(5,"table",29)(6,"thead",30)(7,"tr")(8,"th",38),o(9,"Usage"),t(),i(10,"th",38),o(11,"Frequency"),t(),i(12,"th",39),o(13,"Amount"),t()()(),i(14,"tbody")(15,"tr")(16,"td",40),o(17),_(18,"br"),o(19),f(20,"number"),i(21,"small"),o(22,"month"),t(),o(23,") "),t(),i(24,"td",40)(25,"span"),o(26),_(27,"br"),t(),d(28,_o,3,3,"span",41),t(),i(29,"td",40),d(30,go,5,3,"span",19),i(31,"span"),o(32),f(33,"number"),t()()()()()()()),n&2){let e=c(2);r(17),S(" ",e.data.Zoho.Subscription.OutletCount," Outlet"),r(2),S(" (",v(20,6,e.data.Zoho.Subscription.RecurringAmount)," / "),r(7),g(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==1?"Monthly":e.data.Zoho.Subscription.Frequency==3?"3 Months":"6 Months"),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),g(v(33,8,e.data.Zoho.Subscription.TotalAfterDiscount))}}function ho(n,l){if(n&1&&(i(0,"span",42),o(1),f(2,"number"),t()),n&2){let e=c(3);r(),S("",v(2,1,e.data.Zoho.Subscription.Discount)," %")}}function xo(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),f(3,"number"),t(),_(4,"br"),t()),n&2){let e=c(3);r(2),g(v(3,1,e.data.NextBilling.TotalAmount))}}function vo(n,l){if(n&1){let e=C();i(0,"div",6)(1,"div",7)(2,"div")(3,"h2"),o(4,"Adjusted Plan"),t()(),i(5,"div",43)(6,"button",44),x("click",function(){b(e);let p=c(2);return h(p.onOpenConfirmAdjustedModal())}),o(7," Confirm "),t()()(),i(8,"div",28)(9,"table",29)(10,"thead",30)(11,"tr")(12,"th",38),o(13,"Usage"),t(),i(14,"th",38),o(15,"Frequency"),t(),i(16,"th",39),o(17,"Amount"),t()()(),i(18,"tbody")(19,"tr")(20,"td",40),o(21),_(22,"br"),o(23),f(24,"number"),i(25,"small"),o(26,"month"),t(),o(27,") "),t(),i(28,"td",40)(29,"span"),o(30),_(31,"br"),t(),d(32,ho,3,3,"span",41),t(),i(33,"td",40),d(34,xo,5,3,"span",19),i(35,"span"),o(36),f(37,"number"),t()()()()()()()}if(n&2){let e=c(2);r(21),S(" ",e.data.NextBilling.Outlet," Outlet"),r(2),S(" (",v(24,6,e.data.NextBilling.RecurringAmount)," / "),r(7),g(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==3?"3 Monthly":"6 Months"),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),g(v(37,8,e.data.NextBilling.TotalAfterDiscount))}}function So(n,l){if(n&1&&(i(0,"tr")(1,"th",47),o(2,"Withholding Tax"),t(),i(3,"td"),o(4,":"),t(),i(5,"td"),o(6),t()()),n&2){let e=c(3);r(6),S(" ",e.data.Zoho.WHTPercentage," % ")}}function Co(n,l){if(n&1&&(i(0,"tr")(1,"th",47),o(2,"Document Link"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"a",48),_(7,"i",49),o(8," Upload "),t()()()),n&2){let e=c(3);r(6),He("href",e.data.Zoho.DocumentLink,xe)}}function yo(n,l){if(n&1&&(F(0),i(1,"div",6)(2,"div",7)(3,"h2"),_(4,"i",45),o(5,"Tax Information"),t()(),i(6,"div",9)(7,"table",46),d(8,So,7,1,"tr",19)(9,Co,9,1,"tr",19),t()()(),A()),n&2){let e=c(2);r(8),m("ngIf",e.data.Zoho.WHTPercentage>0),r(),m("ngIf",e.data.Zoho.DocumentLink)}}function Mo(n,l){if(n&1){let e=C();i(0,"a",62),x("click",function(){b(e);let p=c(3);return h(p.payAllInvoice())}),_(1,"i",63),o(2),f(3,"Filter"),f(4,"sum"),f(5,"Filter"),f(6,"sum"),f(7,"number"),t()}if(n&2){let e=c(3);r(2),S(" Pay All ~ IDR ",v(7,15,D(4,5,Ee(3,1,e.data.Zoho.invoices,"overdue","status"),"total")+D(6,12,Ee(5,8,e.data.Zoho.invoices,"sent","status"),"total"))," ")}}function wo(n,l){if(n&1&&(i(0,"p",68),o(1),f(2,"number"),t()),n&2){let e=c().$implicit;r(),S("(",v(2,1,e.balance)," due)")}}function Io(n,l){if(n&1&&(F(0),i(1,"a",69),_(2,"i",70),i(3,"span",71),o(4,"View"),t()(),A()),n&2){let e=c().$implicit;r(),He("href",e.invoice_url,xe)}}function Eo(n,l){if(n&1){let e=C();F(0),i(1,"button",72),x("click",function(){b(e);let p=c().$implicit,s=c(3);return h(s.paySingleInvoice(p))}),_(2,"i",63),i(3,"span",71),o(4,"Pay Now"),t()(),A()}if(n&2){let e=c().$implicit;r(),Jt("id","pay-button",e.invoice_number,"")}}function To(n,l){if(n&1&&(i(0,"tr",64)(1,"td"),o(2),t(),i(3,"td"),o(4),f(5,"date"),t(),i(6,"td"),o(7),t(),i(8,"td",57),o(9),f(10,"number"),d(11,wo,3,3,"p",65),t(),i(12,"td"),o(13),t(),i(14,"td",66),o(15),t(),i(16,"td",67),d(17,Io,5,1,"ng-container",19)(18,Eo,5,2,"ng-container",19),t()()),n&2){let e=l.$implicit,a=l.index;Ke(L(16,mo,e.status=="overdue"?"#f2dede":"")),r(2),g(a+1+"."),r(2),g(D(5,11,e.date,"dd MMM yyyy")),r(3),g(e.invoice_number),r(2),S(" ",v(10,14,e.total)," "),r(2),m("ngIf",e.total!=e.balance&&e.balance>0),r(2),g(e.currency_code),r(2),g(e.status),r(2),m("ngIf",e.status!="draft"&&e.status!="void"),r(),m("ngIf",(e.status=="sent"||e.status=="overdue")&&e.currency_code=="IDR")}}function Do(n,l){if(n&1&&(i(0,"div",6)(1,"div",7)(2,"div",50)(3,"h2",51),_(4,"i",52),o(5," Invoices"),t()(),d(6,Mo,8,17,"a",53),t(),i(7,"div",28)(8,"table",54)(9,"thead",30)(10,"tr")(11,"th",31),o(12,"No"),t(),i(13,"th",55),o(14,"Date"),t(),i(15,"th",56),o(16,"Number"),t(),i(17,"th",57),o(18,"Amount"),t(),_(19,"th",58),i(20,"th",59),o(21,"Status"),t(),i(22,"th"),o(23,"Invoice"),t()()(),i(24,"tbody"),d(25,To,19,18,"tr",60),t()(),i(26,"p",61),o(27," Please pay your biling directly inside our platform. We provide multiple methods ex: Credit Card/Bank Transfer/E-Money. "),t()()()),n&2){let e=c(2);r(6),m("ngIf",e.outstandingInvoiceCount>1&&e.data.Zoho.Subscription.Currency=="RP"),r(19),m("ngForOf",e.data.Zoho.invoices)}}function Po(n,l){if(n&1){let e=C();i(0,"button",73),x("click",function(){b(e);let p=c(2);return h(p.load())}),o(1," Load "),t()}}function Oo(n,l){if(n&1&&(i(0,"tr",64)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",57),o(6),f(7,"number"),t(),i(8,"td",57),o(9),t(),i(10,"td",57),o(11),f(12,"date"),t(),i(13,"td",57),o(14),f(15,"date"),t()()),n&2){let e=l.$implicit,a=l.index;r(2),g(a+1+"."),r(2),g(e.Name),r(),ge(L(16,so,e.OrdersCount<25)),r(),S(" ",v(7,8,e.OrdersCount),""),r(3),g(e.RegisterCount),r(2),g(D(12,10,e.MinDate,"dd MMM yyyy")),r(3),g(D(15,13,e.MaxDate,"dd MMM yyyy"))}}function No(n,l){if(n&1){let e=C();i(0,"mainpanel-cmp",1)(1,"actions"),d(2,co,2,2,"a",2),t(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"h2"),_(10,"i",8),o(11," Account"),t()(),i(12,"div",9)(13,"div",10)(14,"div",11)(15,"div",12)(16,"h5",13),o(17," Since "),t(),d(18,uo,3,4,"div",14),t()(),i(19,"div",15)(20,"div",12)(21,"h5",13),o(22," Type "),t(),i(23,"div",16),o(24),t()()(),d(25,fo,6,6,"div",17),t()()(),d(26,bo,34,10,"div",18)(27,vo,38,10,"div",18)(28,yo,10,2,"ng-container",19),i(29,"div",6)(30,"div",7)(31,"h2"),_(32,"i",20),o(33," Close Store"),t()(),i(34,"div",9)(35,"div"),o(36," You can close your store to stop your billing. "),t(),i(37,"div",21)(38,"button",22),x("click",function(){b(e);let p=c();return h(p.onOpenCloseModal())}),o(39," Close "),t()()()()(),i(40,"div",23),d(41,Do,28,2,"div",18),i(42,"div",6)(43,"div",24)(44,"h2"),_(45,"i",25),o(46," Outlets Usage "),i(47,"small",26),o(48),f(49,"date"),f(50,"date"),t()(),d(51,Po,2,0,"button",27),t(),i(52,"div",28)(53,"table",29)(54,"thead",30)(55,"tr")(56,"th",31),o(57,"No"),t(),i(58,"th"),o(59,"Outlet Name"),t(),i(60,"th",32),o(61,"Orders"),t(),i(62,"th",32),o(63,"Registers"),t(),i(64,"th",33),o(65,"Min Date"),t(),i(66,"th",33),o(67,"Max Date"),t()()(),i(68,"tbody"),d(69,Oo,16,18,"tr",34),f(70,"sortBy"),t()()()()()()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(2),m("ngIf",e.data.Account.Type=="Trial"),r(16),m("ngIf",e.data.Zoho.Subscription),r(6),S(" ",e.data.Account.Type," "),r(),m("ngIf",e.data.Zoho.CustomerID!=null),r(),m("ngIf",e.data.Zoho.Subscription!=null),r(),m("ngIf",e.data.Zoho.Subscription!=null&&e.data.NextBilling&&e.data.Billed>e.data.Zoho.Subscription.OutletCount),r(),m("ngIf",e.data.Zoho.WHTPercentage>0||e.data.Zoho.DocumentLink),r(13),m("ngIf",e.data.Zoho.invoices&&e.data.Zoho.invoices.length>0),r(7),Ie("(",D(49,15,e.data.From,"dd MMM yyyy")," - ",D(50,18,e.data.To,"dd MMM yyyy"),")"),r(3),m("ngIf",e.data.Outlets.length==0),r(18),m("ngForOf",Ee(70,21,e.data.Outlets,"desc","OrdersCount"))}}var St=class n extends ui{constructor(e,a,p,s,E,q){super(e);this.httpService=a;this.matDialog=p;this.midtrans=s;this.ngZone=E;this.toastr=q;this.data=null}modalTitle;modalBody;data;loadOutlet=!1;outstandingInvoiceCount=0;ngOnInit(){this.midtrans.initScript().subscribe(),this.menuData$.subscribe(()=>{this.getData()})}getData(){let e={LoadOutlet:this.loadOutlet};this.httpService.post("/API/Subscription/GetData",e).subscribe({next:a=>{this.data=a,U.IsEmpty(this.data.Outlets)&&(this.data.Outlets=[]),this.postInit(a)}})}postInit(e){e.Zoho.invoices=e.Zoho.invoices?e.Zoho.invoices:[],e.Zoho.code!=200&&(e.Zoho.code==401?this.modalTitle="Trial Customer":e.Zoho.code==400&&(this.modalTitle="your account customer"),e.Zoho.message==null?this.modalBody=e.Zoho.message:this.modalBody=e.Zoho.message,this.matDialog.open(xt,{data:{title:this.modalTitle,body:this.modalBody}})),e.Zoho.invoices.forEach(a=>{(a.status=="sent"||a.status=="overdue")&&this.outstandingInvoiceCount++})}showToaster(e){var a="Payment Successful!";e>1&&(a+=`
|
|
4
|
+
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(a,V.Success)}payAllInvoice(){let e=0,a,p,s,E;this.data.Zoho.invoices.forEach(N=>{(N.status=="sent"||N.status=="overdue")&&(e+=N.total,p==null?(a=N.invoice_number,p=N.invoice_number.concat("$"+N.total+";"),s=N.invoice_id,E=N.invoice_id.concat("$"+N.total+";")):(a=a.concat("_"+N.invoice_number),p=p.concat(N.invoice_number.concat("$"+N.total+";")),s=s.concat(";"+N.invoice_id),E=E.concat(N.invoice_id.concat("$"+N.total)+";")))});let q={CustomerID:this.data.Zoho.invoices[0].customer_id,InvNumber:p,OrderID:a,GrossAmount:e,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:E};this.httpService.post("/API/Subscription/GetSNAPTokenMultipleInvoice",q).subscribe(N=>{this.openSNAPDialog(N)})}paySingleInvoice(e){let a={InvNumber:e.invoice_number,GrossAmount:e.balance,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:e.invoice_id,CustomerID:e.customer_id};this.httpService.post("/API/Subscription/GetSNAPToken",a).subscribe(p=>{this.openSNAPDialog(p)})}openSNAPDialog(e){let a=this.data.Account.SubscriptionStatus;snap.pay(e.token,{onSuccess:p=>{this.ngZone.run(()=>{this.showToaster(a),this.getData()})}})}onOpenCloseModal(){this.matDialog.open(Ae)}onOpenConfirmAdjustedModal(){this.matDialog.open(vt)}load(){this.loadOutlet=!0,this.getData()}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(le),u(Ve),u(Qe),u(H))};static \u0275cmp=y({type:n,selectors:[["POS-my-subscription"]],features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","bg-light-gray"],[1,"row","pt-5","ms-3"],[1,"col-md-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-user"],[1,"card-body"],[1,"row"],[1,"col","pe-0","ps-3"],[1,"p-3","border","rounded","bg-light-gray","text-black"],[1,"fw-bold"],["class","mt-4 h6",4,"ngIf"],[1,"col","pe-3","ps-3"],[1,"mt-4","h6"],["class","col ps-0 pe-3",4,"ngIf"],["class","card",4,"ngIf"],[4,"ngIf"],[1,"fa-solid","fa-xmark-circle"],[1,"mt-4"],["type","button",1,"btn","btn-sm","btn-danger","py-2",3,"click"],[1,"col-md-8"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa","fa-location-dot"],[1,"text-body-secondary","h6"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"card-body","table-responsive"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[2,"width","20px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","120px"],["class","border",4,"ngFor","ngForOf"],[1,"btn","btn-success",3,"routerLink"],[1,"col","ps-0","pe-3"],[1,"p-3","border","rounded","bg-success","text-white"],[1,"text-center"],[1,"text-center",2,"width","104px"],[1,"text-center","align-top"],["class","text-danger",4,"ngIf"],[1,"text-danger"],[1,"btn-group"],["type","button",1,"btn","btn-sm","btn-success","py-2",3,"click"],[1,"fa-solid","fa-file-circle-plus"],[1,"table-sm","table-borderless"],[2,"width","103px"],["target","_blank",1,"btn","btn-light","btn-sm",2,"height","32px",3,"href"],[1,"fa","fa-upload"],[1,"me-auto","d-sm-block"],[1,"d-inline"],[1,"fa-solid","fa-file-invoice"],["class","btn btn-success btn-sm","role","button","matTooltipPosition","above","matTooltip","Pay All",3,"click",4,"ngIf"],["id","tableGrid",1,"table","mt-5"],[2,"width","120px"],[2,"width","100px"],[1,"text-end"],[2,"width","60px"],[2,"width","80px"],["class","border",3,"style",4,"ngFor","ngForOf"],[1,"pt-3"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm",3,"click"],[1,"fa-lg","fa-solid","fa-arrows-rotate"],[1,"border"],["class","fst-italic text-warning",4,"ngIf"],[1,"text-uppercase"],[1,"d-flex","justify-content-between"],[1,"fst-italic","text-warning"],["target","_blank",3,"href"],[1,"fa-lg","fa-solid","fa-file-lines"],[1,"ms-3"],[2,"border-width","1px",3,"click","id"],[1,"btn","btn-outline-secondary",3,"click"]],template:function(a,p){a&1&&d(0,No,71,25,"mainpanel-cmp",0),a&2&&m("ngIf",p.data)},dependencies:[$,O,Te,ee,be,re,Z,mt,xi,st]})};function ko(n,l){n&1&&(i(0,"div",13)(1,"h5",14),_(2,"i",15),o(3," You are not listening to any outlet. Please select one. "),t()())}function Fo(n,l){if(n&1&&(i(0,"div",16)(1,"h5",14),_(2,"i",15),o(3),t()()),n&2){let e=c(2);r(3),S(" You are currently listening to ",e.selectedOutlet==null?null:e.selectedOutlet.Name,". ")}}function Ao(n,l){if(n&1&&(i(0,"div",9)(1,"div",10),d(2,ko,4,0,"div",11)(3,Fo,4,1,"div",12),t()()),n&2){let e=c();r(2),m("ngIf",!e.selectedOutlet),r(),m("ngIf",e.selectedOutlet)}}var Ct=class n{constructor(l,e,a,p){this.signalrClientService=l;this.httpService=e;this.dialogRef=a;this.toastr=p;this.modalConfig=new Y,this.modalConfig.title="Subscribe Notification",this.modalConfig.customWidth="475px",this.initModalLoader(),this.touchOnSelectOption=!1}modalConfig;entities;outletID;selectedOutlet;initialOutlet;touchOnSelectOption;previousSelectedOutlet;initModalLoader(){this.httpService.post("/api/NotificationLoader/PushNotificationList").pipe(ce(l=>U.IsNotEmpty(l))).subscribe(l=>{this.entities=l.Options.Entities,U.IsNotEmpty(l.SubscribeOn)&&(this.outletID=l.SubscribeOn),this.initSelectedOutlet()})}initSelectedOutlet(){this.selectedOutlet=this.findOutletByID(this.outletID),this.previousSelectedOutlet=this.selectedOutlet,this.initialOutlet=this.selectedOutlet,this.checkValidateButtonOk()}checkValidateButtonOk(){this.modalConfig.validated=!0,U.IsEmpty(this.selectedOutlet)&&(this.modalConfig.validated=!1)}onSelectOutlet(l){this.previousSelectedOutlet=this.selectedOutlet,this.selectedOutlet=l,this.modalConfig.validated=!0}onOpenSelectOutlet(){this.touchOnSelectOption=!0}onCancel(){this.dialogRef.close()}onOk(){let l=this.initialOutlet?this.initialOutlet.ID:null;this.outletID!==l?U.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 a=localStorage.getItem("PushNotificationID"),p={EntityID:this.outletID};this.httpService.post("/api/PushNotification/Subscribe",p).subscribe(s=>{this.signalrClientService.SubscribeGroup(this.outletID?this.outletID:"",a),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(a=>a.ID==l)}static \u0275fac=function(e){return new(e||n)(u(ai),u(T),u(Q),u(H))};static \u0275cmp=y({type:n,selectors:[["POS-modal-subscribe-notification"]],decls:11,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container"],["class","row",4,"ngIf"],[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,"row"],[1,"col-12"],["class","alert alert-danger",4,"ngIf"],["class","alert alert-success",4,"ngIf"],[1,"alert","alert-danger"],[1,"d-flex"],["aria-hidden","true",1,"fa-solid","fa-circle-info","me-3","mt-1"],[1,"alert","alert-success"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()})("onClose",function(){return a.onCancel()}),i(1,"content")(2,"div",1),d(3,Ao,4,2,"div",2),i(4,"div",3)(5,"div",4)(6,"h5",5),o(7,"Outlet"),t()(),i(8,"div",6)(9,"div",7)(10,"ng-select",8),x("open",function(){return a.onOpenSelectOutlet()})("clear",function(){return a.onOpenSelectOutlet()}),I("ngModelChange",function(s){return w(a.outletID,s)||(a.outletID=s),s}),x("change",function(s){return a.onSelectOutlet(s)}),t()()()()()()()),e&2&&(m("config",a.modalConfig),r(3),m("ngIf",!a.touchOnSelectOption),r(7),m("items",a.entities),M("ngModel",a.outletID))},dependencies:[O,R,j,K,Ne]})};var Ro=n=>({ID:n});function Bo(n,l){if(n&1&&(i(0,"a",18),o(1),t()),n&2){let e=c().$implicit;m("routerLink","/menu"+e.URL)("queryParams",L(3,Ro,e.ObjectID)),r(),S(" ",e.Body," ")}}function Lo(n,l){if(n&1&&(i(0,"a",19),o(1),t()),n&2){let e=c().$implicit;He("href",e.URL,xe),r(),S(" ",e.Body," ")}}function Ho(n,l){if(n&1&&(i(0,"tr",15)(1,"td"),o(2),t(),i(3,"td")(4,"b"),o(5),t(),_(6,"br"),i(7,"span"),d(8,Bo,2,5,"a",16)(9,Lo,2,2,"a",17),t()(),i(10,"td"),o(11),f(12,"date"),t(),i(13,"td"),o(14),t()()),n&2){let e=l.$implicit;r(2),g(e.OutletName),r(3),g(e.Header),r(3),m("ngIf",e.ObjectIDType>0),r(),m("ngIf",e.ObjectIDType==0),r(2),g(D(12,6,e.Created,"dd MMM yyyy HH:mm")),r(3),g(e.TypeString)}}function jo(n,l){if(n&1){let e=C();i(0,"mat-paginator",20),x("page",function(p){b(e);let s=c(2);return h(s.onPaginationChange(p))}),t()}if(n&2){let e=c(2);m("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Wo(n,l){if(n&1){let e=C();i(0,"mainpanel-cmp",1),x("onSubmit",function(){b(e);let p=c();return h(p.searchFromPageOne())}),i(1,"actions")(2,"a",2),x("click",function(){b(e);let p=c();return h(p.openSubscribeModal())}),o(3,"Subscribe"),t()(),i(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),o(9,"Outlet"),t(),i(10,"ng-select",5),I("ngModelChange",function(p){b(e);let s=c();return w(s.pageData.Filter.ListIDs,p)||(s.pageData.Filter.ListIDs=p),h(p)}),t()(),i(11,"div")(12,"h6"),o(13,"From"),t(),i(14,"datepicker",6),I("dateChange",function(p){b(e);let s=c();return w(s.pageData.Filter.From,p)||(s.pageData.Filter.From=p),h(p)}),t()(),i(15,"div")(16,"h6"),o(17,"To"),t(),i(18,"datepicker",7),I("dateChange",function(p){b(e);let s=c();return w(s.pageData.Filter.To,p)||(s.pageData.Filter.To=p),h(p)}),t()()()()(),i(19,"content")(20,"div",8)(21,"table",9)(22,"thead",10)(23,"tr",11)(24,"th",12),o(25,"Outlet"),t(),i(26,"th"),o(27,"Message"),t(),i(28,"th"),o(29,"Created"),t(),i(30,"th"),o(31,"Type"),t()()(),i(32,"tbody"),d(33,Ho,15,9,"tr",13),t()(),i(34,"div"),d(35,jo,1,3,"mat-paginator",14),t()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0),r(10),m("items",e.pageData.Options.Entities),M("ngModel",e.pageData.Filter.ListIDs),m("multiple",!0),r(4),M("date",e.pageData.Filter.From),r(4),M("date",e.pageData.Filter.To),r(15),m("ngForOf",e.data.Data),r(2),m("ngIf",e.pagination.listTotal>0)}}var yt=class n extends Oe{constructor(e,a,p){super(e,a,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList");this.dialog=p}preInitList(){let e=new Date;e.setHours(0,0,0,0);let a=new Date;a.setHours(23,59,59,59),this.pageData.Filter.From=e,this.pageData.Filter.To=a}openSubscribeModal(){this.dialog.open(Ct)}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(le))};static \u0275cmp=y({type:n,selectors:[["POS-notification"]],features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[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"],["class","border-bottom",4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],[3,"page","length","pageSize","pageIndex"]],template:function(a,p){a&1&&d(0,Wo,36,9,"mainpanel-cmp",0),a&2&&m("ngIf",p.data)},dependencies:[$,O,R,j,Te,ee,lt,ke,Ne,Z]})};var me=class n{_loadSubscriptionData=new Ze(null);loadSubscriptionData$=this._loadSubscriptionData.asObservable();subscriptionData$;lastUnpaidInvoiceDate$;constructor(l){this.subscriptionData$=this.loadSubscriptionData$.pipe(te(()=>l.get("/API/Subscription/GetInitialData").pipe(Ge(e=>{let a=0;e.Subscription?.SubscriptionState=="Overdue"?a=1:e.Subscription?.SubscriptionState=="Sell Only"?a=2:e.Subscription?.SubscriptionState=="Suspended"&&(a=3),U.IsNotEmpty(e.Subscription)&&(e.Subscription.SubscriptionStatus=a)}))),ze(1)),this.lastUnpaidInvoiceDate$=this.subscriptionData$.pipe(se(e=>e.invoices.filter(a=>(a.status=="sent"||a.status=="overdue")&&a.currency_code=="IDR")),se(e=>e.length>0?e[0].date:"-"))}loadSubscriptionData(){this._loadSubscriptionData.next()}static \u0275fac=function(e){return new(e||n)(oe(T))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var Re=class n{constructor(l,e){l.subscriptionData$.pipe(ce(p=>p.code!=200),te(()=>Gt(e.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"])))).subscribe()}static \u0275fac=function(e){return new(e||n)(oe(me),oe(ve))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var Me=class n{outlets$;from$;to$;_isLoadOutlet=new Ze(!1);isLoadOutlet$=this._isLoadOutlet.asObservable().pipe(ce(l=>l));showLoadButton$;constructor(l,e){let a=this.isLoadOutlet$.pipe(te(()=>l.post("/API/Subscription/GetUsage").pipe()),ze(1));this.outlets$=a.pipe(se(p=>p.Outlets)),this.from$=a.pipe(se(p=>p.From)),this.to$=a.pipe(se(p=>p.To)),e.subscriptionData$.pipe(ce(p=>p.Subscription?.OutletCount<=je.outletMaximumSubscription),Ge(()=>this.loadOutlet())).subscribe(),this.showLoadButton$=qt(e.subscriptionData$.pipe(se(p=>p.Subscription?.OutletCount>je.outletMaximumSubscription),$t(1)),a.pipe(se(()=>!1)))}loadOutlet(){this._isLoadOutlet.next(!0)}static \u0275fac=function(e){return new(e||n)(oe(T),oe(me))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var wt=class n{constructor(l,e,a){this.http=l;this.ngZone=e;this.toastr=a}payInvoice(l,e,a,p){let s={InvNumber:l.invoice_number,GrossAmount:l.balance,WHTPercentage:e,VATEnabled:a,InvoiceID:l.invoice_id,CustomerID:l.customer_id};return this.http.post("/API/Subscription/GetSNAPToken",s).pipe(te(E=>this.openSNAPDialog(E,p)))}payAllInvoices(l,e,a,p){let s=0,E,q,N,fe;l.forEach(G=>{(G.status=="sent"||G.status=="overdue")&&(s+=G.total,q==null?(E=G.invoice_number,q=G.invoice_number.concat("$"+G.total+";"),N=G.invoice_id,fe=G.invoice_id.concat("$"+G.total+";")):(E=E.concat("_"+G.invoice_number),q=q.concat(G.invoice_number.concat("$"+G.total+";")),N=N.concat(";"+G.invoice_id),fe=fe.concat(G.invoice_id.concat("$"+G.total)+";")))});let Be={CustomerID:l[0].customer_id,InvNumber:q,OrderID:E,GrossAmount:s,WHTPercentage:e,VATEnabled:a,InvoiceID:fe};return this.http.post("/API/Subscription/GetSNAPTokenMultipleInvoice",Be).pipe(te(G=>this.openSNAPDialog(G,p)))}openSNAPDialog(l,e){let a=e;return new Ue(p=>{snap.pay(l.token,{onSuccess:()=>{this.ngZone.run(()=>{this.showToaster(a),p.next(),p.complete()})}})})}showToaster(l){let e="Payment Successful!";l>1&&(e+=`
|
|
5
|
+
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(e,V.Success)}static \u0275fac=function(e){return new(e||n)(oe(T),oe(Qe),oe(H))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var zo=n=>({"background-color":n});function Go(n,l){if(n&1){let e=C();i(0,"button",12),x("click",function(){b(e);let p=c();return h(p.payAllInvoices())}),o(1),f(2,"number"),t()}if(n&2){let e=c();r(),S("PAY ALL - ",e.currency+" "+v(2,1,e.totalPayable),"")}}function qo(n,l){if(n&1&&(i(0,"a",22),o(1),t()),n&2){let e=c().$implicit;m("href",e.invoice_url,xe),r(),g(e.invoice_number)}}function $o(n,l){if(n&1&&(i(0,"span"),o(1),t()),n&2){let e=c().$implicit;r(),g(e.invoice_number)}}function Qo(n,l){if(n&1){let e=C();i(0,"button",23),x("click",function(){b(e);let p=c().$implicit,s=c();return h(s.payInvoice(p))}),o(1,"Pay"),t()}}function Yo(n,l){if(n&1&&(i(0,"button",24),o(1),t()),n&2){let e=c().$implicit;r(),g(e.status)}}function Ko(n,l){if(n&1&&(i(0,"div",13)(1,"div",14)(2,"div",15)(3,"h3",16),d(4,qo,2,2,"a",17)(5,$o,2,1,"ng-template",null,0,de),t(),i(7,"small",7),o(8),f(9,"date"),t(),i(10,"small",18),o(11),f(12,"date"),t()(),i(13,"div",19)(14,"span",20),o(15),f(16,"number"),t(),d(17,Qo,2,0,"button",21)(18,Yo,2,1,"ng-template",null,1,de),t()()()),n&2){let e=l.$implicit,a=B(6),p=B(19),s=c();Ke(L(18,zo,e.status=="overdue"?"#f2dede":"")),r(4),m("ngIf",e.invoice_url)("ngIfElse",a),r(4),S("Invoice Date: ",D(9,10,e.date,"dd MMM yyyy"),""),r(3),S("Due Date: ",D(12,13,e.date,"dd MMM yyyy"),""),r(4),Ie("",s.currency," ",v(16,16,e.total),""),r(2),m("ngIf",e.status=="sent"||e.status=="overdue")("ngIfElse",p)}}var It=class n{constructor(l,e,a){this.payment=l;this.subscription=e;this.router=a}showPayAll=!0;totalPayable=0;get invoices(){return this._invoices}set invoices(l){U.IsNotEmpty(l)&&(this._invoices=l,this.showPayAll=l.filter(e=>e.status=="sent"||e.status=="overdue"&&e.currency_code=="IDR").length>1,this.totalPayable=l.filter(e=>e.status=="sent"||e.status=="overdue"&&e.currency_code=="IDR").reduce((e,a)=>e+a.total,0))}_invoices=[];WHTPercentage;VATEnabled;subscriptionStatus;currency;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||n)(u(wt),u(me),u(ve))};static \u0275cmp=y({type:n,selectors:[["POS-invoices-card"]],inputs:{invoices:"invoices",WHTPercentage:"WHTPercentage",VATEnabled:"VATEnabled",subscriptionStatus:"subscriptionStatus",currency:"currency"},decls:13,vars:4,consts:[["UNPAID",""],["PAID",""],[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"],["class","btn btn-sm btn-outline-primary btn-pay",3,"click",4,"ngIf"],[1,"card-body","px-0"],[1,"row","gx-0"],["class","invoice-list col-12","style","padding: 0px 15px;",3,"style",4,"ngFor","ngForOf"],[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,"fw-normal"],["target","_blank",3,"href",4,"ngIf","ngIfElse"],[1,"sub-text"],[1,"invoice-payment","text-end","d-flex","flex-column","justify-content-between"],[1,"d-block","invoice-total"],["class","btn btn-sm btn-outline-primary btn-pay text-uppercase py-2",3,"click",4,"ngIf","ngIfElse"],["target","_blank",3,"href"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2",3,"click"],["disabled","",1,"btn","btn-sm","btn-outline-secondary","btn-pay","text-uppercase","py-2"]],template:function(e,a){e&1&&(i(0,"div",2)(1,"div",3)(2,"div",4),_(3,"i",5),i(4,"div")(5,"h3",6),o(6,"Invoices"),t(),i(7,"small",7),o(8,"Invoice are created for each subscription cycle."),t()()(),d(9,Go,3,3,"button",8),t(),i(10,"div",9)(11,"div",10),d(12,Ko,20,20,"div",11),t()()()),e&2&&(r(9),m("ngIf",a.showPayAll&&a.currency!="USD"),r(),Ye("pb-0",a.invoices.length==1),r(2),m("ngForOf",a.invoices))},dependencies:[$,O,re,Z],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}"]})};var Et=class n{subscribedSince;outlets;frequency;total;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["POS-billing-info-card"]],inputs:{subscribedSince:"subscribedSince",outlets:"outlets",frequency:"frequency",total:"total"},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,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Billing Information"),t(),i(5,"small",2),o(6),f(7,"date"),t()()(),i(8,"div",3)(9,"div",4)(10,"div")(11,"h3",5),o(12),t(),i(13,"h5",6),o(14,"Outlet"),t()(),_(15,"div",7),i(16,"div")(17,"h3",5),o(18),t(),i(19,"h5",6),o(20,"Frequency"),t()(),_(21,"div",7),i(22,"div")(23,"h3",5),o(24),f(25,"number"),t(),i(26,"h5",6),o(27,"Amount"),t()()()()()),e&2&&(r(6),S("Subscribe Since: ",D(7,4,a.subscribedSince,"dd MMM yyyy"),""),r(6),g(a.outlets),r(6),S("",a.frequency," Month"),r(6),g(v(25,7,a.total)))},dependencies:[re,Z],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}"]})};var Wt=n=>({"is-invalid":n});function ea(n,l){n&1&&(F(0),i(1,"div",12),o(2,"Email is required."),t(),A())}function ta(n,l){n&1&&(F(0),i(1,"div",12),o(2,"Phone is required."),t(),A())}function ia(n,l){n&1&&(F(0),_(1,"div",12),A())}var Tt=class n{constructor(l,e,a){this.dialogRef=l;this.toastr=a;this.config.title="Update Billing Contact",this.config.customWidth="500px",this.email=e.email,this.phone=e.phone,this.mobilePhone=e.mobilePhone}email;phone="";mobilePhone="";form;fb=Le(mi);data=Le(ie);config=new Y;generateForm(){this.form=this.fb.group({email:this.fb.control(null,[Bt.required]),phone:this.fb.control(null,[Bt.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:a}=this.form.value;this.dialogRef.close({email:l,phone:e,mobilePhone:a})}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)(u(Q),u(ie),u(H))};static \u0275cmp=y({type:n,selectors:[["POS-dialog-update-billing"]],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"],[4,"ngIf"],["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"],["id","",1,"invalid-feedback"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),i(1,"content")(2,"form",1)(3,"div",2)(4,"label",3),o(5,"Email"),i(6,"sup",4),o(7,"*"),t()(),i(8,"div",5),_(9,"input",6),d(10,ea,3,0,"ng-container",7),t()(),i(11,"div",2)(12,"label",8),o(13,"Phone"),i(14,"sup",4),o(15,"*"),t()(),i(16,"div",5),_(17,"input",9),d(18,ta,3,0,"ng-container",7),t()(),i(19,"div",2)(20,"label",10),o(21,"Mobile Phone"),t(),i(22,"div",5),_(23,"input",11),d(24,ia,2,0,"ng-container",7),t()()()()()),e&2&&(m("config",a.config)("dynamicValidated",a.form.valid),r(2),m("formGroup",a.form),r(7),m("ngClass",L(9,Wt,a.form.controls.email.invalid&&(a.form.controls.email.dirty||a.form.controls.email.touched))),r(),m("ngIf",a.form.controls.email.errors==null?null:a.form.controls.email.errors.required),r(7),m("ngClass",L(11,Wt,a.form.controls.phone.invalid&&(a.form.controls.phone.dirty||a.form.controls.phone.touched))),r(),m("ngIf",a.form.controls.phone.errors==null?null:a.form.controls.phone.errors.required),r(5),m("ngClass",L(13,Wt,a.form.controls.mobilePhone.invalid&&(a.form.controls.mobilePhone.dirty||a.form.controls.mobilePhone.touched))),r(),m("ngIf",a.form.controls.mobilePhone.errors))},dependencies:[et,O,Ce,z,R,Se,ri,li,K],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 Dt=class n{constructor(l,e,a,p){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=p;this.config.title="Pause Subscription",this.config.customWidth="480px"}message="";month=1;config=new Y;onOk(){let l={Month:this.month,Reason:this.message};if(this.message.trim().length==0){this.toastr.error("The reason cannot be empty",V.Error);return}this.month==0&&this.toastr.error("Month must be bigger than zero",V.Error),this.httpService.post("/api/subscription/pause",l).subscribe(e=>{this.toastr.success(e.Message,V.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(u(T),u(Q),u(ie),u(H))};static \u0275cmp=y({type:n,selectors:[["POS-dialog-pause-subscription"]],standalone:!0,features:[ei],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,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"h6",1),o(3,"Your data will be retained but you will lose access until renewal is made"),t(),_(4,"br"),i(5,"h4",1),o(6,"How long would you like to pause your subscription? "),t(),i(7,"div",2)(8,"input",3),I("ngModelChange",function(s){return w(a.month,s)||(a.month=s),s}),t(),i(9,"label",4),o(10,"Months"),t()(),i(11,"div",5)(12,"textarea",6),I("ngModelChange",function(s){return w(a.message,s)||(a.message=s),s}),t(),i(13,"label",4),o(14,"Reason"),t()()()()),e&2&&(m("config",a.config),r(8),M("ngModel",a.month),r(4),M("ngModel",a.message))},dependencies:[tt,pt,K,ot,z,R,j]})};var Pt=class n{constructor(l,e,a){this.matDialog=l;this.http=e;this.toastr=a;ti(()=>{this.updateBillingOnPageLoad()&&this.updateBilling()})}updateBillingOnPageLoad=Yt();lastUnpaidInvoiceDate;email;phone;mobilePhone;recurringStatus;cancel(){this.matDialog.open(Ae).afterClosed().subscribe()}pause(){this.matDialog.open(Dt).afterClosed().subscribe()}updateBilling(){this.matDialog.open(Tt,{data:{email:this.email,phone:this.phone,mobilePhone:this.mobilePhone}}).afterClosed().pipe(ce(l=>U.IsNotEmpty(l)),te(l=>this.http.post("/API/Subscription/UpdateBillingData",{Email:l.email,Phone:l.phone,Mobile:l.mobilePhone}).pipe(se(e=>Zt(Ut({},l),{Message:e.Message}))))).subscribe(l=>{this.toastr.success(l.Message,V.Success),this.email=l.email,this.phone=l.phone,this.mobilePhone=l.mobilePhone})}static \u0275fac=function(e){return new(e||n)(u(le),u(T),u(H))};static \u0275cmp=y({type:n,selectors:[["POS-renewal-card"]],inputs:{updateBillingOnPageLoad:[1,"updateBillingOnPageLoad"],lastUnpaidInvoiceDate:"lastUnpaidInvoiceDate",email:"email",phone:"phone",mobilePhone:"mobilePhone",recurringStatus:"recurringStatus"},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,a){if(e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Renewal"),t(),i(5,"small",2),o(6),t()(),i(7,"div",3)(8,"button",4),_(9,"b",5),t(),i(10,"ul",6)(11,"li")(12,"a",7),x("click",function(){return a.updateBilling()}),o(13,"Update Billing Contact"),t()(),i(14,"li")(15,"a",7),x("click",function(){return a.pause()}),o(16,"Pause Subscription"),t()(),i(17,"li")(18,"a",7),x("click",function(){return a.cancel()}),o(19,"Cancel Renewal"),t()()()()(),i(20,"div",8)(21,"div",9)(22,"div",10)(23,"h3",11),o(24),f(25,"date"),t(),i(26,"h5",12),o(27,"Invoice Date"),t()(),_(28,"div",13),i(29,"div",14)(30,"div")(31,"h3",11),o(32),t(),i(33,"h5",12),o(34,"Billing Email"),t()(),i(35,"div",15)(36,"h3",11),o(37),t(),i(38,"h5",12),o(39),t()()()()()()),e&2){let p;r(5),Ye("text-success",a.recurringStatus=="active")("text-danger",a.recurringStatus=="stopped"),r(),g(a.recurringStatus),r(18),g(a.lastUnpaidInvoiceDate=="-"?a.lastUnpaidInvoiceDate:D(25,13,a.lastUnpaidInvoiceDate,"dd MMM yyyy")),r(8),g((p=a.email)!==null&&p!==void 0?p:"-"),r(5),Vt("",a.phone," ",a.phone&&a.mobilePhone?"/":""," ",a.mobilePhone,""),r(2),Vt("",a.phone?"Phone":""," ",a.phone&&a.mobilePhone?"/":""," ",a.mobilePhone?"Mobile Phone":"","")}},dependencies:[Z],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 oa=n=>({"bg-gradient-warning":n});function aa(n,l){if(n&1&&(i(0,"small",14),o(1),f(2,"date"),f(3,"date"),t()),n&2){let e=c();r(),S("(",D(2,1,e.lastMonthDate,"dd MMM yyyy")+" - "+D(3,4,e.currentDate,"dd MMM yyyy"),")")}}function ra(n,l){if(n&1){let e=C();i(0,"button",15),x("click",function(){b(e);let p=c();return h(p.loadOutlet())}),o(1,"Load"),t()}}function la(n,l){if(n&1){let e=C();i(0,"button",15),x("click",function(){b(e);let p=c();return h(p.loadMinMax())}),o(1,"Load Min Max Date"),t()}}function pa(n,l){n&1&&(i(0,"th",11),o(1,"Min Date"),t())}function ma(n,l){n&1&&(i(0,"th",11),o(1,"Max Date"),t())}function sa(n,l){if(n&1&&(i(0,"td",17),o(1),f(2,"date"),t()),n&2){let e=c().$implicit;r(),g(D(2,1,e.MinDate,"dd MMM yyyy"))}}function ca(n,l){if(n&1&&(i(0,"td",17),o(1),f(2,"date"),t()),n&2){let e=c().$implicit;r(),g(D(2,1,e.MaxDate,"dd MMM yyyy"))}}function da(n,l){if(n&1&&(i(0,"tr",16)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",17),o(6),f(7,"number"),t(),i(8,"td",17),o(9),f(10,"number"),t(),d(11,sa,3,4,"td",18)(12,ca,3,4,"td",18),t()),n&2){let e,a,p=l.$implicit,s=l.index,E=c();r(2),g(s+1),r(2),S(" ",p.Name," "),r(),ge(L(12,oa,(p==null?null:p.OrdersCount)<25||p.OrdersCount==null)),r(),S(" ",v(7,8,(e=p.OrdersCount)!==null&&e!==void 0?e:0),""),r(3),g(v(10,10,(a=p.RegisterCount)!==null&&a!==void 0?a:1)),r(2),m("ngIf",E.isLoadMinMaxDate),r(),m("ngIf",E.isLoadMinMaxDate)}}var Ot=class n{constructor(l,e){this.outletUsage=l;this.http=e}lastMonthDate;currentDate;outlets;showLoadButton;isLoadMinMaxDate=!1;loadOutlet(){this.outletUsage.loadOutlet()}loadMinMax(){this.http.post("/api/subscription/GetOutletWithMinMax").subscribe(l=>{this.outlets=l.Outlets,this.isLoadMinMaxDate=!0})}static \u0275fac=function(e){return new(e||n)(u(Me),u(T))};static \u0275cmp=y({type:n,selectors:[["POS-outlet-card"]],inputs:{lastMonthDate:"lastMonthDate",currentDate:"currentDate",outlets:"outlets",showLoadButton:"showLoadButton"},decls:27,vars:10,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"],["class","sub-text d-block",4,"ngIf"],["class","btn btn-sm btn-outline-secondary",3,"click",4,"ngIf"],[1,"card-body","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],[1,"text-end",2,"width","120px"],["style","width: 120px","class","text-end",4,"ngIf"],["class","border",4,"ngFor","ngForOf"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-secondary",3,"click"],[1,"border"],[1,"text-end"],["class","text-end",4,"ngIf"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),_(3,"i",3),i(4,"div")(5,"h3",4),o(6,"Outlets Usage"),t(),d(7,aa,4,7,"small",5),t()(),d(8,ra,2,0,"button",6)(9,la,2,0,"button",6),t(),i(10,"div",7)(11,"table",8)(12,"thead",9)(13,"tr")(14,"th",10),o(15,"No"),t(),i(16,"th"),o(17,"Name"),t(),i(18,"th",11),o(19,"Orders"),t(),i(20,"th",11),o(21,"Registers"),t(),d(22,pa,2,0,"th",12)(23,ma,2,0,"th",12),t()(),i(24,"tbody"),d(25,da,13,14,"tr",13),f(26,"sortBy"),t()()()()),e&2&&(r(7),m("ngIf",a.outlets==null?null:a.outlets.length),r(),m("ngIf",a.showLoadButton),r(),m("ngIf",!a.showLoadButton&&!a.isLoadMinMaxDate),r(13),m("ngIf",a.isLoadMinMaxDate),r(),m("ngIf",a.isLoadMinMaxDate),r(2),m("ngForOf",Ee(26,6,a.outlets,"desc","OrdersCount")))},dependencies:[$,O,re,Z,st],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}"]})};function fa(n,l){if(n&1){let e=C();F(0),i(1,"input",13),I("ngModelChange",function(p){b(e);let s=c();return w(s.nameForm,p)||(s.nameForm=p),h(p)}),t(),A()}if(n&2){let e=c();r(),M("ngModel",e.nameForm)}}function _a(n,l){if(n&1&&(i(0,"h4",14),o(1),t()),n&2){let e,a=c();r(),g((e=a.name)!==null&&e!==void 0?e:"-")}}function ga(n,l){if(n&1){let e=C();F(0),i(1,"input",13),I("ngModelChange",function(p){b(e);let s=c();return w(s.npwpForm,p)||(s.npwpForm=p),h(p)}),t(),A()}if(n&2){let e=c();r(),M("ngModel",e.npwpForm)}}function ba(n,l){if(n&1&&(i(0,"h4",14),o(1),t()),n&2){let e,a=c();r(),g((e=a.npwp)!==null&&e!==void 0?e:"-")}}function ha(n,l){if(n&1){let e=C();F(0),i(1,"textarea",15),I("ngModelChange",function(p){b(e);let s=c();return w(s.addressForm,p)||(s.addressForm=p),h(p)}),t(),A()}if(n&2){let e=c();r(),M("ngModel",e.addressForm)}}function xa(n,l){if(n&1&&(i(0,"h4",14),o(1),t()),n&2){let e,a=c();r(),g((e=a.taxAddress)!==null&&e!==void 0?e:"-")}}function va(n,l){if(n&1&&(i(0,"div",11)(1,"h4",9),o(2,"Document Link"),t(),i(3,"h4",14)(4,"a",16),o(5),t()()()),n&2){let e,a=c();r(4),m("href",a.documentLink,xe),r(),g((e="view")!==null&&e!==void 0?e:"-")}}function Sa(n,l){if(n&1&&(i(0,"div",11)(1,"h4",9),o(2,"WHT"),t(),i(3,"h4",14),o(4),t()()),n&2){let e,a=c();r(4),S("",(e=a.whtPercentage)!==null&&e!==void 0?e:"-","%")}}var Nt=class n{constructor(l){this.http=l}outletCount;name;npwp;documentLink;whtPercentage;frequency;taxAddress;isEdit=!1;nameForm="";npwpForm="";addressForm="";editData(){this.isEdit?this.http.post("/API/Subscription/UpdateTaxInformation",{TaxID:this.npwpForm,TaxName:this.nameForm,TaxAddress:this.addressForm}).subscribe(()=>{this.isEdit=!1,this.name=this.nameForm,this.npwp=this.npwpForm,this.taxAddress=this.addressForm}):(this.isEdit=!0,this.nameForm=this.name,this.npwpForm=this.npwp,this.addressForm=this.taxAddress)}static \u0275fac=function(e){return new(e||n)(u(T))};static \u0275cmp=y({type:n,selectors:[["POS-tax-card"]],inputs:{outletCount:"outletCount",name:"name",npwp:"npwp",documentLink:"documentLink",whtPercentage:"whtPercentage",frequency:"frequency",taxAddress:"taxAddress"},decls:30,vars:9,consts:[["nameField",""],["npwpField",""],["taxAddressField",""],[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"],[4,"ngIf","ngIfElse"],[1,"d-flex","justify-content-between","mt-8"],["class","d-flex justify-content-between mt-8",4,"ngIf"],["type","text",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],[1,"text-secondary","fw-normal","user-info"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["target","_blank",3,"href"]],template:function(e,a){if(e&1){let p=C();i(0,"div",3)(1,"div",4)(2,"div")(3,"h3"),o(4,"Tax Information"),t(),i(5,"small",5),o(6,"PPN 11% + Tax Invoice"),t()(),i(7,"button",6),x("click",function(){return b(p),h(a.editData())}),o(8),t()(),i(9,"div",7)(10,"div",8)(11,"h4",9),o(12,"Full Name"),t(),d(13,fa,2,1,"ng-container",10)(14,_a,2,1,"ng-template",null,0,de),t(),i(16,"div",11)(17,"h4",9),o(18,"NPWP"),t(),d(19,ga,2,1,"ng-container",10)(20,ba,2,1,"ng-template",null,1,de),t(),i(22,"div",11)(23,"h4",9),o(24,"Tax Address"),t(),d(25,ha,2,1,"ng-container",10)(26,xa,2,1,"ng-template",null,2,de),t(),d(28,va,6,2,"div",12)(29,Sa,5,1,"div",12),t()()}if(e&2){let p=B(15),s=B(21),E=B(27);r(8),g(a.isEdit?"Save":"Edit"),r(5),m("ngIf",a.isEdit)("ngIfElse",p),r(6),m("ngIf",a.isEdit)("ngIfElse",s),r(6),m("ngIf",a.isEdit)("ngIfElse",E),r(3),m("ngIf",a.documentLink),r(),m("ngIf",a.whtPercentage)}},dependencies:[O,z,R,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}.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 ya(n,l){if(n&1&&_(0,"POS-tax-card",12),n&2){let e=c().ngIf;m("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 Ma(n,l){if(n&1&&(i(0,"mainpanel-cmp",1)(1,"content")(2,"div",2)(3,"section",3)(4,"div",4)(5,"div",5),_(6,"POS-invoices-card",6)(7,"POS-outlet-card",7),f(8,"async"),f(9,"async"),f(10,"async"),f(11,"async"),t(),i(12,"div",8),_(13,"POS-billing-info-card",9)(14,"POS-renewal-card",10),d(15,ya,1,7,"POS-tax-card",11),t()()()()()()),n&2){let e=l.ngIf,a=c();m("pageData",a.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(6),m("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),r(),m("lastMonthDate",v(8,23,a.from$))("currentDate",v(9,25,a.to$))("outlets",v(10,27,a.outlets$))("showLoadButton",v(11,29,a.showLoadButton$)),r(6),m("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),r(),m("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),r(),m("ngIf",(e.Subscription==null?null:e.Subscription.Currency)!="USD")}}var kt=class n{title=Le(oi);menuData={H:"My Subscription",N:{SM:[]},T:"My Subscription",U:[]};outlets$;from$;to$;subscriptionData$;lastUnpaidInvoiceDate$;showLoadButton$;constructor(l,e,a,p){let E=this.title.getTitle().split("|")[0]+"| My Subscription";this.title.setTitle(E),this.subscriptionData$=l.subscriptionData$,this.lastUnpaidInvoiceDate$=l.lastUnpaidInvoiceDate$,this.outlets$=a.outlets$,this.showLoadButton$=a.showLoadButton$,this.from$=a.from$,this.to$=a.to$,p.initScript().subscribe()}static \u0275fac=function(e){return new(e||n)(u(me),u(Re),u(Me),u(Ve))};static \u0275cmp=y({type:n,selectors:[["POS-my-subscription-v2"]],features:[Xt([me,Re,Me])],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[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,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress",4,"ngIf"],[3,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress"]],template:function(e,a){e&1&&(d(0,Ma,16,31,"mainpanel-cmp",0),f(1,"async")),e&2&&m("ngIf",v(1,1,a.subscriptionData$))},dependencies:[O,ee,It,Et,Pt,Ot,Nt,ni],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 wa(n,l){if(n&1){let e=C();i(0,"div",15),x("click",function(){b(e);let p=c().index,s=c(2);return h(s.readMore(p))}),o(1,"read more..."),t()}}function Ia(n,l){if(n&1&&(i(0,"tr",12)(1,"td")(2,"b"),o(3),t(),_(4,"div",13),d(5,wa,2,0,"div",14),t(),i(6,"td"),o(7),f(8,"date"),t(),i(9,"td"),o(10),t()()),n&2){let e=l.$implicit;r(3),g(e.Header),r(),m("innerHTML",e.displayedMessage,P),r(),m("ngIf",e.showReadMore),r(2),g(D(8,5,e.Created,"dd MMM yyyy HH:mm")),r(3),g(e.IsFinished?"Finished":"In Progress")}}function Ea(n,l){if(n&1){let e=C();i(0,"mat-paginator",16),x("page",function(p){b(e);let s=c(2);return h(s.onPaginationChange(p))}),t()}if(n&2){let e=c(2);m("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Ta(n,l){if(n&1){let e=C();i(0,"mainpanel-cmp",1),x("onSubmit",function(){b(e);let p=c();return h(p.searchFromPageOne())}),i(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),o(6,"From"),t(),i(7,"datepicker",4),I("dateChange",function(p){b(e);let s=c();return w(s.pageData.Filter.From,p)||(s.pageData.Filter.From=p),h(p)}),t()(),i(8,"div")(9,"h6"),o(10,"To"),t(),i(11,"datepicker",5),I("dateChange",function(p){b(e);let s=c();return w(s.pageData.Filter.To,p)||(s.pageData.Filter.To=p),h(p)}),t()()()()(),i(12,"content")(13,"div",6)(14,"table",7)(15,"thead",8)(16,"tr",9)(17,"th"),o(18,"Message"),t(),i(19,"th"),o(20,"Created"),t(),i(21,"th"),o(22,"Status"),t()()(),i(23,"tbody"),d(24,Ia,11,8,"tr",10),t()(),i(25,"div"),d(26,Ea,1,3,"mat-paginator",11),t()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0),r(7),M("date",e.pageData.Filter.From),r(4),M("date",e.pageData.Filter.To),r(13),m("ngForOf",e.data.Data),r(2),m("ngIf",e.pagination.listTotal>0)}}var Ft=class n extends Oe{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 a=e.Body;e.displayedMessage=a.length<=120?a:a.slice(0,120),e.showReadMore=a.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||n)(u(pe),u(T))};static \u0275cmp=y({type:n,selectors:[["POS-async-notification"]],features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[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"],["class","border-bottom",4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"border-bottom"],[2,"word-break","break-all",3,"innerHTML"],["class","text-primary pointer",3,"click",4,"ngIf"],[1,"text-primary","pointer",3,"click"],[3,"page","length","pageSize","pageIndex"]],template:function(e,a){e&1&&d(0,Ta,27,6,"mainpanel-cmp",0),e&2&&m("ngIf",a.data)},dependencies:[$,O,ee,lt,ke,Z]})};var Da=[{path:"Main/My_Profile",component:ft},{path:"Main/My_Subscription",component:kt},{path:"Main/My_Subscription/V2",component:St},{path:"Notification/Push",component:yt},{path:"Notification/Async",component:Ft},{path:"Main/My_Sales",component:gt},{path:"Main/My_Subscription/Choose_your_plan",component:ht}],At=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=$e({type:n});static \u0275inj=qe({imports:[Rt.forChild(Da),Rt]})};var Ui=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=$e({type:n});static \u0275inj=qe({providers:[Z],imports:[tt,ot,si,At,yi,vi,pt,_i,wi,di,Pi,fi,Di,Ci,ci,Fi,Ni,Vi,Ei]})};export{Ui as ProfileModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as F,e as P,f as U}from"./chunk-WK4T26FX.js";import{C as j,h as $,n as Q}from"./chunk-4G26RHGA.js";import{a as B}from"./chunk-26YXEYJK.js";import{Ab as u,E as g,Ea as s,Fb as V,Ib as v,Kb as T,L as m,P as b,Sb as E,Tb as L,Ua as y,Ub as M,Zb as O,_b as D,ba as _,cd as z,d,gb as I,ia as S,mb as p,nb as N,pa as C,qa as w,t as h,wa as a,xa as o,zb as f}from"./chunk-H55AJAX5.js";var c=class{_dataBuffer;_bufferSize;_data;_loading;_input$=new d;_destroy$=new d;constructor(){this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(m(200),b(),h(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),g(e=>e!==void 0),_(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let i=-1,t;return this._data.filter(r=>(t=JSON.stringify(r).toLowerCase(),i=t.indexOf(e),i!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,i){if(B.IsNotEmpty(e)){let t=this._data.filter(n=>n[i].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=t.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,i=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(i)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var R=["selectId"];function A(l,e){if(l&1&&(f(0,"span",3),O(1),u()),l&2){let i=e.item,t=T();p("title",i[t.bindLabel]),y(),D(i[t.bindLabel])}}var k=class l{placeholder;bindValue;bindLabel;width="100%";clearable=!0;parent="body";disabled=!1;optionTitle=!1;ngSelectElement;set items(e){this.ngSelectInfiniteScroll.data=e,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}_selected;get selected(){return this._selected}set selected(e){this._selected=e,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}selectedChange;selectedLabel;onOpen;ngSelectInfiniteScroll;constructor(){this.ngSelectInfiniteScroll=new c,this.selectedChange=new s,this.selectedLabel=new s,this.onOpen=new s}onOpenSelect(){this.onOpen.emit()}onSelectChange(e){e?(this.selectedChange.emit(e[this.bindValue]),this.selectedLabel.emit(e[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}static \u0275fac=function(i){return new(i||l)};static \u0275cmp=C({type:l,selectors:[["ng-select-infinite"]],viewQuery:function(i,t){if(i&1&&E(R,7),i&2){let n;L(n=M())&&(t.ngSelectElement=n.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(i,t){if(i&1){let n=V();f(0,"ng-select",1,0),v("clear",function(){return a(n),o(t.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return a(n),o(t.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return a(n),o(t.onOpenSelect())})("change",function(J){return a(n),o(t.onSelectChange(J))}),I(2,A,2,2,"ng-template",2),u()}i&2&&(N("width",t.width),p("appendTo",t.parent)("disabled",t.disabled)("virtualScroll",!0)("typeahead",t.ngSelectInfiniteScroll.input$)("items",t.ngSelectInfiniteScroll.bufferData)("bindLabel",t.bindLabel)("bindValue",t.bindValue)("placeholder",t.placeholder)("ngModel",t.selected)("clearable",t.clearable))},dependencies:[P,F,$,Q]})},q=class l{static \u0275fac=function(i){return new(i||l)};static \u0275mod=w({type:l});static \u0275inj=S({imports:[z,U,j]})};export{k as a,q as b};
|