dealpos 25.51.0 → 25.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-OURNAI65.js → chunk-243EB36Y.js} +2 -2
- package/browser/{chunk-5HIJCKLY.js → chunk-3K2A4Z67.js} +1 -1
- package/browser/{chunk-43G72GH2.js → chunk-4OP4E5Q4.js} +1 -1
- package/browser/{chunk-V6NXOOJA.js → chunk-4PDGY62B.js} +1 -1
- package/browser/{chunk-WR54IKY6.js → chunk-54SK3PVO.js} +1 -1
- package/browser/{chunk-VQKO557Q.js → chunk-55Z32OLJ.js} +1 -1
- package/browser/{chunk-SVUFU2AS.js → chunk-5XTMPVSF.js} +1 -1
- package/browser/{chunk-67UFIJ2O.js → chunk-6OULAYGH.js} +1 -1
- package/browser/{chunk-HIA4J5DB.js → chunk-6VYP636I.js} +1 -1
- package/browser/{chunk-PV27CMZ2.js → chunk-7264OPXA.js} +1 -1
- package/browser/{chunk-XWV7AI2C.js → chunk-7OQXKVTC.js} +1 -1
- package/browser/{chunk-6UY42XOC.js → chunk-AB7O2ERM.js} +1 -1
- package/browser/{chunk-T5IJP474.js → chunk-ABOSNV75.js} +1 -1
- package/browser/{chunk-HHCNN3XR.js → chunk-BCGNQKO5.js} +1 -1
- package/browser/{chunk-RU3GD3GY.js → chunk-BRQVQGLJ.js} +1 -1
- package/browser/{chunk-2EHLYOAD.js → chunk-BWVEZ3MZ.js} +1 -1
- package/browser/{chunk-RHDU4PR2.js → chunk-CAGFIP4G.js} +1 -1
- package/browser/{chunk-4MWVPOV6.js → chunk-CJ4ET4PG.js} +1 -1
- package/browser/{chunk-CRKJEU3Z.js → chunk-CR5CHTI7.js} +1 -1
- package/browser/{chunk-4CYACZL5.js → chunk-DAH4EEQV.js} +1 -1
- package/browser/{chunk-SCHTN7VQ.js → chunk-DBRZ7F2Z.js} +1 -1
- package/browser/{chunk-VA6MHJ5E.js → chunk-DNY4JYTC.js} +1 -1
- package/browser/{chunk-IM3B5EF2.js → chunk-E5TUY2II.js} +1 -1
- package/browser/chunk-EFDMYOLZ.js +4 -0
- package/browser/{chunk-NRTKHF45.js → chunk-EMHEIQNS.js} +1 -1
- package/browser/{chunk-QS2AUXB7.js → chunk-FEHMPX43.js} +1 -1
- package/browser/{chunk-WQMYMJLR.js → chunk-FVFTYYCC.js} +1 -1
- package/browser/{chunk-BVOUQJCA.js → chunk-GE5I6JYL.js} +1 -1
- package/browser/{chunk-ZNPC63ZV.js → chunk-GZ6OVEDL.js} +1 -1
- package/browser/{chunk-NQQB5U5S.js → chunk-H6RHVRGW.js} +1 -1
- package/browser/{chunk-6LZENMYE.js → chunk-HLCZLXPS.js} +1 -1
- package/browser/{chunk-N6EBK52R.js → chunk-IF6EZMOM.js} +2 -2
- package/browser/{chunk-OTLU2WY3.js → chunk-ISZRZRCT.js} +2 -2
- package/browser/{chunk-I7AQHKKG.js → chunk-JHBK7LOJ.js} +1 -1
- package/browser/{chunk-PQSGJR4P.js → chunk-KDISSQKT.js} +1 -1
- package/browser/{chunk-5ZPO7V26.js → chunk-KFC3V2GW.js} +1 -1
- package/browser/{chunk-KEILLJ6G.js → chunk-KHB5Q7IN.js} +1 -1
- package/browser/{chunk-P5XKSQ34.js → chunk-KIYO2YC2.js} +1 -1
- package/browser/{chunk-HVFYCXLX.js → chunk-KKM7I2BT.js} +1 -1
- package/browser/{chunk-DX56EYRS.js → chunk-LHTHIOAY.js} +1 -1
- package/browser/{chunk-A5LIALQE.js → chunk-M4FNFZNJ.js} +1 -1
- package/browser/{chunk-TOJPS7BJ.js → chunk-MEL6Z4NI.js} +1 -1
- package/browser/{chunk-XVTXHAKW.js → chunk-MHPLYS7O.js} +1 -1
- package/browser/{chunk-ZO3XZXWW.js → chunk-MJCLLJBB.js} +1 -1
- package/browser/{chunk-2GIDUMXS.js → chunk-MZDVGN2B.js} +1 -1
- package/browser/{chunk-SUCJCOST.js → chunk-NYMHQHNP.js} +1 -1
- package/browser/{chunk-6AHKVKAZ.js → chunk-O7SYLGUB.js} +2 -2
- package/browser/{chunk-OZ2R2K2V.js → chunk-OF3BZHBQ.js} +1 -1
- package/browser/{chunk-H2RXYP7A.js → chunk-OFWJY5WB.js} +1 -1
- package/browser/{chunk-3HDEMBWS.js → chunk-ORTAUDOX.js} +1 -1
- package/browser/{chunk-4OTZNFYS.js → chunk-PSLGWGNP.js} +1 -1
- package/browser/{chunk-MUWJSYXR.js → chunk-Q22HR52N.js} +1 -1
- package/browser/{chunk-ZNJ4JTTS.js → chunk-QEL7CGCP.js} +1 -1
- package/browser/{chunk-57WKDIDF.js → chunk-QHGZQ2IG.js} +1 -1
- package/browser/{chunk-6F45DEGR.js → chunk-R6DRKF4V.js} +8 -8
- package/browser/{chunk-HHM4L75O.js → chunk-RDASAJA5.js} +1 -1
- package/browser/{chunk-HSLDD424.js → chunk-RPBIQ4ME.js} +1 -1
- package/browser/{chunk-DJUOMCAV.js → chunk-RT7OZJYZ.js} +1 -1
- package/browser/{chunk-3PKJLXTC.js → chunk-RWW55Z7V.js} +1 -1
- package/browser/{chunk-V36Z6WRV.js → chunk-RWZGTR3S.js} +1 -1
- package/browser/{chunk-YXRJV3RQ.js → chunk-SQAFHZEO.js} +1 -1
- package/browser/{chunk-RF5FWMSR.js → chunk-T43ISYOP.js} +1 -1
- package/browser/{chunk-6O6OE4KQ.js → chunk-TKHSLAZH.js} +13 -13
- package/browser/{chunk-OAVGNXY4.js → chunk-TYVVSM36.js} +1 -1
- package/browser/{chunk-D7YMUC3H.js → chunk-U6FO6TSU.js} +1 -1
- package/browser/{chunk-XPN6EISF.js → chunk-UFVN6MTY.js} +1 -1
- package/browser/{chunk-VOY3BJZP.js → chunk-UI6U53UY.js} +1 -1
- package/browser/{chunk-B6TCVVAN.js → chunk-UPV6ZIB5.js} +1 -1
- package/browser/{chunk-6GCAXVFO.js → chunk-VG3B7TDX.js} +1 -1
- package/browser/{chunk-OR4H5IKL.js → chunk-VS6CGXUJ.js} +1 -1
- package/browser/{chunk-T6GXIGYG.js → chunk-WDUPZI6X.js} +1 -1
- package/browser/{chunk-TCW7SVU5.js → chunk-WTIIZBRC.js} +1 -1
- package/browser/{chunk-HQGZC4Y3.js → chunk-XCSDEGWL.js} +1 -1
- package/browser/{chunk-WFTIOB7Q.js → chunk-XDFUPYND.js} +1 -1
- package/browser/{chunk-3XDE3GJ3.js → chunk-XFU3EMCG.js} +1 -1
- package/browser/{chunk-7JBFR3T4.js → chunk-XGXXFTMA.js} +1 -1
- package/browser/{chunk-DCONKX6G.js → chunk-XMPWQ5UV.js} +1 -1
- package/browser/{chunk-ECW7GAZQ.js → chunk-XPM7J5AN.js} +1 -1
- package/browser/{chunk-HZP6OUOI.js → chunk-XW7VJLDW.js} +1 -1
- package/browser/{chunk-MTUBVUM5.js → chunk-Y6SAXN2J.js} +1 -1
- package/browser/{chunk-A2EDYIYP.js → chunk-YLXBICIW.js} +1 -1
- package/browser/{chunk-IHIJW73V.js → chunk-Z5HEFUTD.js} +1 -1
- package/browser/{chunk-YC2LQSY3.js → chunk-ZRJU5XBX.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-PHIUFC5R.js → main-6NLSRECT.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-QERITLZK.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as H,d as N}from"./chunk-
|
|
1
|
+
import{c as H,d as N}from"./chunk-GZ6OVEDL.js";import{a as P,b as R}from"./chunk-TRK4LJDS.js";import{oa as F}from"./chunk-Z76C52NM.js";import{F as k,h as A,o as E}from"./chunk-7MRUPBXU.js";import{a as m}from"./chunk-WUV22SZ4.js";import{s}from"./chunk-TANYEHMZ.js";import{Ab as I,Cb as T,Hb as _,Hc as M,Ib as u,Ic as x,Jb as i,Ub as w,Wb as D,Xa as p,Y as f,Ya as C,ca as O,d as h,eb as a,fa as S,ib as y,jc as d,la as g,lc as L,o as G,ob as v,pa as b,qd as $,xd as j}from"./chunk-L3U6V3BF.js";var c=class l{http=b(s);onOpenTreeSelector$=new h;outletGroups$=this.onOpenTreeSelector$.pipe(O(e=>e.length?G(e):this.http.get("/API/outlet/ActiveOptions"),[]),f(1));constructor(){}loadOutletGroups(){this.onOpenTreeSelector$.next()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=g({token:l,factory:l.\u0275fac,providedIn:"root"})};function z(l,e){if(l&1&&(u(0,"div"),d(1),i()),l&2){let t=D();p(),L(" ",t.selectedOutletGroupLabel," ")}}function J(l,e){l&1&&(u(0,"label",3),d(1,"Outlet Group"),i())}var B=class l{constructor(e,t){this.http=e;this.outletGroup=t}outletGroups=[];showClear=!1;showLabel=!1;selectedOutletGroup;selectedOutletGroupID;selectedOutletGroupIDChange=new C;selectedOutletGroupLabel;isLoadOutletGroups=!1;top=0;outletGroups$;ngAfterViewInit(){let e=document.querySelector("body");this.top=e.getBoundingClientRect().top*-1}ngOnInit(){this.outletGroups.length>0&&(m.IsEmpty(this.selectedOutletGroupID)&&(this.selectedOutletGroupID=this.outletGroups[0]?.key),this.selectedOutletGroup=this.findSelectedOutletGroup(this.outletGroups,this.selectedOutletGroupID),this.generateLabelSelectedOutletGroup(this.selectedOutletGroup)),this.outletGroups$=this.outletGroup.outletGroups$.pipe(S(e=>{console.log(e),this.selectedOutletGroup=this.findSelectedOutletGroup(e,this.selectedOutletGroupID),this.generateLabelSelectedOutletGroup(this.selectedOutletGroup)}))}onSelectOutletGroup(e){this.selectedOutletGroup=e,this.generateLabelSelectedOutletGroup(this.selectedOutletGroup),this.selectedOutletGroupID=e?.key,this.selectedOutletGroupIDChange.emit(this.selectedOutletGroupID)}generateLabelSelectedOutletGroup(e){if(e){let t=[];this.selectedOutletGroupLabel="";do t=[...t,e.label],e=e.parent;while(e!==void 0);this.selectedOutletGroupLabel=t.reverse().join("/")}else this.selectedOutletGroupLabel="Select OutletGroup"}findSelectedOutletGroup(e,t){if(m.IsNotEmpty(t))for(let o of e){if(o.key===t)return o;{o.children=o.children?o.children:[],o.children=o.children.map(n=>(n.parent=o,n));let r=this.findSelectedOutletGroup(o.children,t);if(r)return r}}else return null}loadOutletGroups(){try{setTimeout(()=>{let e=document.querySelector(".p-overlay.p-component");if(e){let t=this.top+e.getBoundingClientRect().top,o=e.getAttribute("style")||"";e.setAttribute("style",`${o} top: ${t+this.top}px;`)}},0)}catch(e){console.error("Error:",e)}finally{this.outletGroup.loadOutletGroups()}}onClear(){this.selectedOutletGroupID=null,this.selectedOutletGroupIDChange.emit(this.selectedOutletGroupID)}static \u0275fac=function(t){return new(t||l)(a(s),a(c))};static \u0275cmp=y({type:l,selectors:[["POS-outlet-group-tree-select"]],inputs:{outletGroups:"outletGroups",showClear:"showClear",showLabel:"showLabel",selectedOutletGroupID:"selectedOutletGroupID"},outputs:{selectedOutletGroupIDChange:"selectedOutletGroupIDChange"},decls:5,vars:6,consts:[["variant","on",1,"w-full","md:w-80"],["appendTo","body","inputId","selectOutletGroup","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectOutletGroup",3,"click","ngModelChange","onClear","options","ngModel","showClear"],["pTemplate","value"],["for","selectOutletGroup"]],template:function(t,o){t&1&&(u(0,"p-floatlabel",0)(1,"p-treeSelect",1),M(2,"async"),w("click",function(){return o.loadOutletGroups()})("ngModelChange",function(n){return o.onSelectOutletGroup(n)})("onClear",function(){return o.onClear()}),v(3,z,2,1,"ng-template",2),i(),I(4,J,2,0,"label",3),i()),t&2&&(p(),_("options",x(2,4,o.outletGroups$))("ngModel",o.selectedOutletGroup)("showClear",o.showClear),p(3),T(o.showLabel?4:-1))},dependencies:[j,N,H,F,k,A,E,R,P,$],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important}"]})};export{B as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ji,b as Hi}from"./chunk-A7C35XPM.js";import{a as ut}from"./chunk-
|
|
1
|
+
import{a as ji,b as Hi}from"./chunk-A7C35XPM.js";import{a as ut}from"./chunk-CAGFIP4G.js";import{a as Vi}from"./chunk-BHQZXJKQ.js";import{a as ct,b as _i}from"./chunk-P7KMHPVN.js";import"./chunk-U4MC22BG.js";import{b as Bi,c as Li}from"./chunk-6I2YT4SH.js";import{a as Ai,b as Ri}from"./chunk-AQKJ3LSN.js";import{a as st}from"./chunk-KHB5Q7IN.js";import{a as xi}from"./chunk-Y7ZKGM5U.js";import{a as hi}from"./chunk-75FYOZH7.js";import{d as Ne,e as Ni}from"./chunk-AHTR7XKG.js";import"./chunk-NS6IC2PT.js";import"./chunk-3RK6DDJD.js";import"./chunk-SMEVWRVE.js";import"./chunk-JQDS4BXR.js";import"./chunk-F3HDP5CA.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import{d as Ei,e as Pi}from"./chunk-ODYEJFNJ.js";import"./chunk-WSWTWRKJ.js";import{a as ki,b as Fi}from"./chunk-XWYCNPUZ.js";import{a as Fe}from"./chunk-XCSDEGWL.js";import"./chunk-55Z32OLJ.js";import{a as Ii,b as Oi}from"./chunk-TRK4LJDS.js";import{e as te,f as Di}from"./chunk-MZDVGN2B.js";import"./chunk-QJ3CWKQT.js";import"./chunk-LB5UXGDG.js";import"./chunk-7YYWBCWJ.js";import"./chunk-CCIHCGP5.js";import{a as gi,c as bi}from"./chunk-FM7BHGBW.js";import"./chunk-TP6ZUC53.js";import"./chunk-RWW55Z7V.js";import{a as Ci,b as le}from"./chunk-XPM7J5AN.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import{F as wi,G as Ti,u as Y,v as K,w as mt}from"./chunk-3ZH3XK5V.js";import{b as ge,c as fi}from"./chunk-V6D6TV7B.js";import{F as pt,N as Mi,g as dt,o as Si,s as vi,u as yi}from"./chunk-QWLNF7VL.js";import{a as si}from"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import{d as ye}from"./chunk-SCGKVOSE.js";import{e as Q,f as ne,g as ee}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-4HLKKTIV.js";import"./chunk-RIZ4YVMH.js";import{a as F}from"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{A as ke,C as di,D as at,E as pi,F as rt,G as ui,c as G,e as jt,h as N,i as Se,k as Oe,o as B,p as ve,t as ci,w as mi}from"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import{b as lt}from"./chunk-KBLVOO4J.js";import{a as j}from"./chunk-WUV22SZ4.js";import{a as Ue}from"./chunk-H6RHVRGW.js";import{p as R,s as E}from"./chunk-TANYEHMZ.js";import{Ab as u,Ac as A,Bc as tt,Cb as f,E as me,Eb as H,Fb as W,Gb as U,Hb as d,Hc as g,Ib as i,Ic as y,Jb as t,Jc as I,Kb as h,Kc as Pe,Ld as li,N as Yt,Nc as it,Ob as je,Pb as He,Pd as ot,Qa as q,Rb as v,Rc as ti,Rd as xe,Sa as he,Sd as Ie,Ub as b,Ud as Lt,Vc as ii,Wb as m,Xa as r,Y as qe,Za as Ye,aa as ie,c as Ge,d as qt,da as Kt,e as $e,eb as p,ec as X,fa as ze,gc as Je,hc as Xe,ib as M,ic as _e,id as nt,jb as Ke,jc as o,kc as x,kd as ni,la as fe,lc as S,ld as oi,ma as Qe,mb as re,mc as Ee,nc as Bt,o as zt,oa as ae,ob as V,oc as w,pa as Te,pc as T,qc as D,qd as ai,sd as Z,t as ce,ta as _,ua as C,uc as We,ud as Ce,vc as Xt,x as Qt,xd as ri,ya as Jt,yc as ei,zc as et}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import{a as Gt,b as $t}from"./chunk-SNAKHGZS.js";function Ht(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 Qi="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Yi="0123456789ABCDEFGHIJKLMNOPQRSTUV",Ki="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Wt(n,l,e){e=e||{};let a,s;switch(l){case"RFC3548":case"RFC4648":a=Qi,s=!0;break;case"RFC4648-HEX":a=Yi,s=!0;break;case"Crockford":a=Ki,s=!1;break;default:throw new Error("Unknown base32 variant: "+l)}let c=e.padding!==void 0?e.padding:s,P=Ht(n),z=0,O=0,ue="";for(let Le=0;Le<P.byteLength;Le++)for(O=O<<8|P.getUint8(Le),z+=8;z>=5;)ue+=a[O>>>z-5&31],z-=5;if(z>0&&(ue+=a[O<<5-z&31]),c)for(;ue.length%8!==0;)ue+="=";return ue}var ft=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=F.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(e){return new(e||n)(p(Q))};static \u0275cmp=M({type:n,selectors:[["POS-modal-confirmation-disabled"]],standalone:!1,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),b("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&&d("config",a.config)},dependencies:[K],encapsulation:2})};function Xi(n,l){if(n&1){let e=v();i(0,"div")(1,"div",1),o(2," Two Factor Authentication Status: "),i(3,"span",2),o(4,"Enabled"),t()()(),i(5,"div",3)(6,"button",4),b("click",function(){_(e);let s=m();return C(s.onDisableTotp())}),o(7,"Disable Two Factor Authentication"),t()()}}function en(n,l){if(n&1){let e=v();i(0,"div",5)(1,"div",6)(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",5)(7,"div",6)(8,"ol",7)(9,"li",8)(10,"h5"),o(11,"Download Authenticator application"),t(),i(12,"div",9)(13,"a",10),h(14,"img",11),o(15," Microsoft Authenticator "),t(),i(16,"a",12),h(17,"img",13),o(18," Google Authenticator "),t()()(),i(19,"li",14)(20,"h5"),o(21,"Scan the QR code below"),t(),i(22,"div",3),h(23,"qr-code",15),t()(),i(24,"li",14)(25,"h5"),o(26,"Validate your QR Code"),t(),i(27,"form",16),b("submit",function(){_(e);let s=m();return C(s.onValidate())}),i(28,"div")(29,"input",17),b("keypress",function(s){_(e);let c=m();return C(c.numberOnly(s))}),D("ngModelChange",function(s){_(e);let c=m();return T(c.validation2FA.ValidationCode,s)||(c.validation2FA.ValidationCode=s),C(s)}),t()(),i(30,"div",3)(31,"button",18),o(32,"Validate"),t()()()()()()()}if(n&2){let e=m();r(23),d("value",e.qrcodeContent)("size",265),r(6),w("ngModel",e.validation2FA.ValidationCode)}}var _t=class n{constructor(l,e,a,s){this.document=l;this.authenticatorService=e;this.toastrService=a;this.dialog=s;this.destroy$=new qt}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=j.parseJwt(localStorage.getItem("Token"));let s=a.LID;this.qrcodeContent=`otpauth://totp/${s}?secret=${e}&issuer=${l}`}generateRandomSecret(){let l=j.Guid_NewGuid(),e=new TextEncoder().encode(l);return Wt(e,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(Kt(this.destroy$)).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let l=!0;return j.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 j.numberOnly(l)}onDisableTotp(){this.dialog.open(ft).afterClosed().pipe(me(l=>j.IsNotEmpty(l)),ie(()=>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)(p(Jt),p(st),p(R),p(ee))};static \u0275cmp=M({type:n,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},standalone:!1,decls:3,vars:1,consts:[[1,"container-fluid","mt-6"],[1,"d-inline-block","fs-5"],[1,"text-success","fw-bold"],[1,"mt-6"],["type","button","type","submit",1,"btn","btn-sm","btn-danger",3,"click"],[1,"row"],[1,"col-12"],[1,"ps-7"],[1,"fw-bold"],[1,"d-flex","align-items-center","mt-6"],["href","https://play.google.com/store/apps/details?id=com.azure.authenticator","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Microsoft_Authenticator.png",2,"width","35px"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Google_Authenticator.png",2,"width","35px"],[1,"fw-bold","mt-6"],["errorCorrectionLevel","H",1,"qr2fa",3,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(e,a){e&1&&(i(0,"div",0),u(1,Xi,8,0)(2,en,33,3),t()),e&2&&(r(),f(a.totpEnabled?1:2))},dependencies:[ve,G,N,Se,B,Oe,Ai],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
|
|
2
2
|
`],encapsulation:2})};var Ut=n=>({active:n}),Wi=n=>({"ng-invalid ng-dirty":n}),on=(n,l)=>({border:n,"border-danger":l}),an=n=>({"border-top-0":n});function rn(n,l){if(n&1){let e=v();i(0,"button",71),b("click",function(){_(e);let s=m(3);return C(s.validate())}),o(1," Submit "),t()}if(n&2){m(2);let e=X(36);d("disabled",e==null||e.form==null?null:e.form.invalid)}}function ln(n,l){if(n&1&&(je(0),V(1,rn,2,1,"button",70),He()),n&2){let e=m(2);r(),d("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function sn(n,l){n&1&&(i(0,"small",75),o(1,"*Email is required"),t())}function cn(n,l){n&1&&(i(0,"small",75),o(1,"*Enter a valid email address"),t())}function mn(n,l){if(n&1&&(je(0),V(1,sn,2,0,"small",74)(2,cn,2,0,"small",74),He()),n&2){m();let e=X(2);r(),d("ngIf",e.errors==null?null:e.errors.required),r(),d("ngIf",e.errors==null?null:e.errors.pattern)}}function dn(n,l){if(n&1){let e=v();i(0,"div",25)(1,"input",72,4),D("ngModelChange",function(s){_(e);let c=m(2);return T(c.formData.Email,s)||(c.formData.Email=s),C(s)}),t(),i(3,"label",73),o(4,"Email"),t(),V(5,mn,3,2,"ng-container",7),t()}if(n&2){let e=X(2),a=m(2);r(),_e(tt(5,on,e.touched&&e.invalid,e.touched&&e.invalid)),w("ngModel",a.formData.Email),d("disabled",!(a.roleService.users.View||a.roleService.profile.View)),r(4),d("ngIf",e.touched)}}function pn(n,l){n&1&&(i(0,"small",75),o(1,"*Enter a valid email address"),t())}function un(n,l){if(n&1&&(je(0),V(1,pn,2,0,"small",74),He()),n&2){m();let e=X(2);r(),d("ngIf",e.errors==null?null:e.errors.pattern)}}function fn(n,l){if(n&1){let e=v();i(0,"div",25)(1,"input",76,4),D("ngModelChange",function(s){_(e);let c=m(2);return T(c.formData.Email,s)||(c.formData.Email=s),C(s)}),t(),i(3,"label",73),o(4,"Email"),t(),V(5,un,2,1,"ng-container",7),t()}if(n&2){let e=X(2),a=m(2);r(),d("disabled",!(a.roleService.users.View||a.roleService.profile.View)),w("ngModel",a.formData.Email),r(4),d("ngIf",e.touched)}}function _n(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 gn(n,l){if(n&1&&(i(0,"ul",77)(1,"li",78),o(2),t()()),n&2){let e=l.$implicit;r(2),x(e)}}function bn(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),x(a+1),r(2),x(e.Key),r(2),x(e.Value)}}function hn(n,l){if(n&1&&(i(0,"ul",77)(1,"li",78),o(2),t()()),n&2){let e=l.$implicit;r(2),x(e)}}function xn(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),x(a+1),r(2),x(e.Key),r(2),x(e.Value)}}function Sn(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(),_e(A(3,an,a/4>=1)),r(),S(" ",e.Model," ")}}function vn(n,l){if(n&1&&(i(0,"div",59)(1,"div",79),o(2),t(),i(3,"div",44)(4,"div",20),V(5,Sn,3,5,"div",80),t()()()),n&2){let e=l.$implicit;r(2),S(" ",e.Name," "),r(3),d("ngForOf",e.ListRole)}}function yn(n,l){if(n&1){let e=v();i(0,"button",85),b("click",function(){_(e);let s=m(3);return C(s.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=m(3);d("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientID)}}function Mn(n,l){if(n&1){let e=v();i(0,"a",86),b("click",function(){_(e);let s=m(3);return C(s.preview("Profile/GenerateClientID"))}),o(1,"Generate"),t()}}function wn(n,l){if(n&1&&(i(0,"div",21)(1,"div",64),h(2,"input",65),t()()),n&2){let e=m(3);r(2),d("value",e.formData.ClientSecret)}}function Tn(n,l){if(n&1){let e=v();i(0,"button",85),b("click",function(){_(e);let s=m(3);return C(s.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=m(3);d("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientSecret)}}function Dn(n,l){if(n&1){let e=v();i(0,"a",86),b("click",function(){_(e);let s=m(3);return C(s.preview("Profile/GenerateClientSecret"))}),o(1,"Generate"),t()}}function En(n,l){if(n&1&&(je(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),h(9,"input",65),t()(),i(10,"div",21)(11,"div",25),V(12,yn,2,2,"button",66)(13,Mn,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),V(20,wn,3,1,"div",84),i(21,"div",21)(22,"div",25),V(23,Tn,2,2,"button",66)(24,Dn,2,0,"a",67),t()()(),He()),n&2){let e=m(2);r(9),d("value",e.formData.ClientID),r(3),d("ngIf",e.formData.ClientID),r(),d("ngIf",e.roleService.users.View||e.roleService.profile.View),r(7),d("ngIf",e.formData.ClientSecret),r(3),d("ngIf",e.formData.ClientSecret),r(),d("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function Pn(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 In(n,l){if(n&1){let e=v();i(0,"button",85),b("click",function(){_(e);let s=m(2);return C(s.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=m(2);d("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.OTTUrl)}}function On(n,l){if(n&1){let e=v();i(0,"a",86),b("click",function(){_(e);let s=m(2);return C(s.generateOTT("Profile/GenerateOneTimeToken"))}),o(1,"Generate"),t()}}function kn(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",6)(1,"actions"),V(2,ln,2,1,"ng-container",7),t(),i(3,"content")(4,"div",8)(5,"div")(6,"ul",9)(7,"li",10)(8,"a",11),b("click",function(){_(e);let s=m();return C(s.onSelectTab("GENERAL"))}),o(9,"General"),t()(),i(10,"li",10)(11,"a",12),b("click",function(){_(e);let s=m();return C(s.onSelectTab("SECURITY"))}),o(12,"Outlet Access"),t()(),i(13,"li",10)(14,"a",13),b("click",function(){_(e);let s=m();return C(s.onSelectTab("ROLES"))}),o(15,"Roles"),t()(),i(16,"li",10)(17,"a",14),b("click",function(){_(e);let s=m();return C(s.onSelectTab("API"))}),o(18,"Developer API"),t()(),i(19,"li",10)(20,"a",15),b("click",function(){_(e);let s=m();return C(s.onSelectTab("TOTP"))}),o(21,"TOTP"),t()(),i(22,"li",10)(23,"a",16),b("click",function(){_(e);let s=m();return C(s.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),D("ngModelChange",function(s){_(e);let c=m();return T(c.formData.FirstName,s)||(c.formData.FirstName=s),C(s)}),t(),i(39,"label",27),o(40,"First Name"),t()(),i(41,"div",25)(42,"input",28),D("ngModelChange",function(s){_(e);let c=m();return T(c.formData.LastName,s)||(c.formData.LastName=s),C(s)}),t(),i(43,"label",29),o(44,"Last Name"),t()(),i(45,"div",25)(46,"input",30),D("ngModelChange",function(s){_(e);let c=m();return T(c.formData.LoginID,s)||(c.formData.LoginID=s),C(s)}),t(),i(47,"label",31),o(48,"Username"),t()(),V(49,dn,6,8,"div",32)(50,fn,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),D("ngModelChange",function(s){_(e);let c=m();return T(c.formData.NewPassword,s)||(c.formData.NewPassword=s),C(s)}),t(),i(63,"label",35),o(64,"Password"),t()(),V(65,_n,2,0,"i",36),t(),i(66,"div",37)(67,"p-floatLabel")(68,"p-password",38,2),D("ngModelChange",function(s){_(e);let c=m();return T(c.formData.RePassword,s)||(c.formData.RePassword=s),C(s)}),t(),i(70,"label",35),o(71,"Re-Password"),t()(),u(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),V(82,gn,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"),V(102,bn,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),V(112,hn,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"),V(132,xn,7,3,"tr",50),t()()()()()()(),i(133,"div",52),V(134,vn,6,2,"div",53),t(),i(135,"div",54),V(136,En,25,6,"ng-container",55)(137,Pn,3,0,"ng-template",null,3,it),t(),i(139,"div",56),h(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),h(152,"input",65),t()(),i(153,"div",21)(154,"div",25),V(155,In,2,2,"button",66)(156,On,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=X(62),a=X(69),s=X(138),c=m();d("pageData",c.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(2),d("ngIf",c.activeTab=="GENERAL"),r(6),d("ngClass",A(38,Ut,c.activeTab=="GENERAL")),r(3),d("ngClass",A(40,Ut,c.activeTab=="SECURITY")),r(15),d("ngClass",A(42,Ut,c.activeTab=="GENERAL")),r(12),w("ngModel",c.formData.FirstName),d("disabled",!(c.roleService.users.View||c.roleService.profile.View)),r(4),w("ngModel",c.formData.LastName),d("disabled",!(c.roleService.users.View||c.roleService.profile.View)),r(4),w("ngModel",c.formData.LoginID),d("disabled",!(c.roleService.users.View||c.roleService.profile.View)),r(3),d("ngIf",c.data.EmailRequired),r(),d("ngIf",!c.data.EmailRequired),r(11),d("toggleMask",!0)("feedback",!1)("disabled",!(c.roleService.users.View||c.roleService.profile.View)),w("ngModel",c.formData.NewPassword),d("ngClass",A(44,Wi,e.touched&&e.invalid)),r(4),d("ngIf",(e.touched||a.dirty)&&e.invalid),r(3),w("ngModel",c.formData.RePassword),d("toggleMask",!0)("feedback",!1)("disabled",!(c.roleService.users.View||c.roleService.profile.View))("ngClass",A(46,Wi,c.formData.NewPassword!=c.formData.RePassword&&(a.touched||a.dirty))),r(4),f(c.formData.NewPassword!=c.formData.RePassword&&(a.touched||a.dirty)?72:-1),r(10),d("ngForOf",c.data.Security.Groups),r(20),d("ngForOf",c.data.Security.Outlets),r(10),d("ngForOf",c.data.Security.Groups),r(20),d("ngForOf",c.data.Security.Outlets),r(2),d("ngForOf",c.data.Role),r(2),d("ngIf",c.roleService.developer.Api)("ngIfElse",s),r(4),d("totpEnabled",c.totpEnabled),r(12),d("value",c.formData.OneTimeToken),r(3),d("ngIf",c.formData.OneTimeToken),r(),d("ngIf",c.roleService.users.View||c.roleService.profile.View)}}var Ct=class n extends ut{constructor(e,a,s,c,P,z,O){super(e,a,"Profile/MyProfileFormInitial",s);this.toastr=c;this.dialog=P;this.authenticatorService=z;this.roleService=O}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.",F.Error);return}this.onSubmit("Profile/SubmitProfile")}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",F.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form=a},error:a=>{this.toastr.error(a,F.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,F.Error)}})}static \u0275fac=function(a){return new(a||n)(p(le),p(E),p(ot),p(R),p(ee),p(st),p(lt))};static \u0275cmp=M({type:n,selectors:[["POS-my-profile"]],standalone:!1,features:[re],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","readonly","",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,s){a&1&&V(0,kn,163,48,"mainpanel-cmp",5),a&2&&d("ngIf",s.data&&s.formData)},dependencies:[nt,ni,oi,ve,G,N,Se,ke,at,B,Oe,te,ge,Bi,ji,Ii,_t],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 Fn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],Nn=n=>({ID:n});function Vn(n,l){if(n&1){let e=v();i(0,"div",17)(1,"h6"),o(2,"Type"),t(),i(3,"ng-select",18),D("ngModelChange",function(s){_(e);let c=m(2);return T(c.pageData.Filter.TypeID,s)||(c.pageData.Filter.TypeID=s),C(s)}),t(),i(4,"h6"),o(5,"Customer"),t(),i(6,"autocompleteV2",19),b("onInputChange",function(s){_(e);let c=m(2);return C(c.resetCustomer(s))})("onSelect",function(s){_(e);let c=m(2);return C(c.onSelectCustomer(s))}),t(),i(7,"h6"),o(8,"From"),t(),i(9,"datepicker",20),D("dateChange",function(s){_(e);let c=m(2);return T(c.pageData.Filter.From,s)||(c.pageData.Filter.From=s),C(s)}),t(),i(10,"h6"),o(11,"To"),t(),i(12,"datepicker",21),D("dateChange",function(s){_(e);let c=m(2);return T(c.pageData.Filter.To,s)||(c.pageData.Filter.To=s),C(s)}),t()()}if(n&2){let e=m(2);r(3),d("items",e.pageData.Options.Types),w("ngModel",e.pageData.Filter.TypeID),r(6),w("date",e.pageData.Filter.From),r(3),w("date",e.pageData.Filter.To)}}function An(n,l){n&1&&(i(0,"th",10),o(1," @@ Cost "),t())}function Rn(n,l){if(n&1&&(i(0,"span",29),o(1),g(2,"amountFraction"),t()),n&2){let e=m().$implicit;r(),x(" - Profit: "+y(2,1,e.Profit))}}function Bn(n,l){if(n&1&&(i(0,"small"),o(1),t()),n&2){let e=m(2).$implicit;r(),S("( ",e.Commissions[0].Quantity," unit )")}}function Ln(n,l){if(n&1&&(i(0,"i",42),o(1),u(2,Bn,2,1,"small"),t()),n&2){let e=m().$implicit;r(),S("sold by ",e.Commissions[0].SalesName," "),r(),f(e.Commissions[0].Quantity<e.Quantity?2:-1)}}function jn(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 Hn(n,l){if(n&1&&(i(0,"ul",43)(1,"li")(2,"i"),o(3,"sold by"),t()(),W(4,jn,3,1,"li",null,H),t()),n&2){let e=m().$implicit;r(4),U(e.Commissions)}}function Wn(n,l){if(n&1&&(i(0,"th",48),o(1),g(2,"amountFraction"),t()),n&2){let e=m().$implicit;r(),S(" ",y(2,1,e.UnitCost)," ")}}function Un(n,l){if(n&1&&(i(0,"tr",37)(1,"th",39)(2,"div",40)(3,"span",41),o(4),t(),u(5,Ln,3,2,"i",42),u(6,Hn,6,0,"ul",43),h(7,"span",44),g(8,"newlines"),t()(),i(9,"th",45),o(10),t(),i(11,"th",46),o(12),g(13,"quantityFraction"),t(),i(14,"th",47),o(15),t(),u(16,Wn,3,3,"th",48),i(17,"th",49),o(18),g(19,"amountFraction"),t(),i(20,"th",50),o(21),t(),i(22,"th",51),o(23),g(24,"amountFraction"),t()()),n&2){let e=l.$implicit,a=m(3);r(4),x(e.Name),r(),f(e.Commissions.length==1?5:-1),r(),f(e.Commissions.length>1?6:-1),r(),d("innerHTML",y(8,11,e.Note),q),r(3),S(" ",e.Code," "),r(2),S(" ",y(13,13,e.Quantity)," "),r(3),S(" ",e.UOMName," "),r(),f(a.roleService.product.Cost?16:-1),r(2),S(" ",y(19,15,e.UnitPrice)," "),r(3),S(" ",e.Discount==0?"":e.Discount+"%"," "),r(2),S(" ",y(24,17,e.Total)," ")}}function Zn(n,l){if(n&1&&(i(0,"tr")(1,"th",52),o(2),t(),i(3,"th",53),o(4),t(),i(5,"th",54),o(6),g(7,"amountFraction"),t()()),n&2){let e=l.$implicit;r(2),S("",e.Label," :"),r(2),S(" ",e.CurrencySymbol," "),r(2),S(" ",y(7,3,e.Amount)," ")}}function Gn(n,l){if(n&1&&(i(0,"div")(1,"div",22)(2,"div",23)(3,"a",24),h(4,"span",25),g(5,"date"),h(6,"small",26),g(7,"date"),t(),i(8,"span"),o(9),g(10,"showIfNotNullOrEmptyString"),t(),h(11,"span",27),i(12,"strong",28),o(13),g(14,"sum"),i(15,"span"),o(16),g(17,"showIfNotNullOrEmptyString"),t()(),u(18,Rn,3,3,"span",29),i(19,"i",30),o(20),t(),i(21,"span",31),o(22),t(),i(23,"span",32),o(24),t()(),i(25,"div",33),h(26,"label",34),t()(),i(27,"table",35)(28,"tbody",36),W(29,Un,25,19,"tr",37,H),t()(),i(31,"table",38),W(32,Zn,8,5,"tr",null,H),t()()),n&2){let e=l.$implicit,a=m(2);r(3),d("routerLink",et(27,Fn))("queryParams",A(28,Nn,e.ID)),r(),d("innerHTML",e.EntityName+" #"+e.Number+" - "+I(5,12,e.Date,"dd MMM yyyy"),q),r(2),d("innerHTML","("+I(7,15,e.Created,"HH:mm")+")",q),r(3),x(I(10,18,e.CustomerNameDisplay," - {0}")),r(4),S(" ","[Q: "+I(14,21,e.Items,"Quantity")+"]"," "),r(3),x(I(17,24,e.SalesName," - Sales: {0}")),r(2),f(a.roleService.report.Profit?18:-1),r(2),x(e.DeliveryOutlet==null?"":": Delivered from "+e.DeliveryOutlet),r(2),x(e.PromotionCoupon==null?"":": "+e.PromotionCoupon),r(2),x(e.SONote==null?"":": "+e.SONote),r(2),d("innerHTML",e.PaymentStateLabel,q),r(3),U(e.Items),r(3),U(e.Aggregate)}}function $n(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",2),b("onSubmit",function(){_(e);let s=m();return C(s.searchFromPageOne())}),i(1,"filters"),V(2,Vn,13,4,"ng-template",null,0,it),t(),i(4,"content")(5,"div",3)(6,"table",4)(7,"thead",5)(8,"tr")(9,"th",6),o(10,"Name"),t(),i(11,"th",7),o(12,"Code"),t(),i(13,"th",8),o(14,"Qty"),t(),i(15,"th",9),o(16,"UOM"),t(),u(17,An,2,0,"th",10),i(18,"th",11),o(19,"@@ Price"),t(),i(20,"th",12),o(21,"%"),t(),i(22,"th",13),o(23,"Total"),t()()()(),W(24,Gn,34,30,"div",null,H),i(26,"div",14)(27,"button",15),b("click",function(){_(e);let s=m();return C(s.showSummaryReport())}),o(28," View Report Summary "),t()(),i(29,"POS-complex-pagination",16),b("jumpToPage",function(){_(e);let s=m();return C(s.getListData())})("previousPage",function(){_(e);let s=m();return C(s.getListData())})("nextPage",function(){_(e);let s=m();return C(s.getListData())}),t()()()()}if(n&2){let e=m();d("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),r(17),f(e.roleService.product.Cost?17:-1),r(7),U(e.data.Data),r(5),d("total",e.data.Data?e.data.Data.length:0)("pageData",e.pageData)}}var bt=class n extends Fe{constructor(e,a,s){super(e,a,"Report/MySales","ReportLoader/MyActivity");this.roleService=s}dialog=Te(ee);onSelectCustomer(e){this.pageData.Filter.CustomerID=e}resetCustomer(e){e==""&&(this.pageData.Filter.CustomerID=null)}showSummaryReport(){this.dialog.open(Vi,{data:{Filter:this.pageData.Filter}})}static \u0275fac=function(a){return new(a||n)(p(le),p(E),p(lt))};static \u0275cmp=M({type:n,selectors:[["POS-my-sales"]],standalone:!1,features:[re],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","660px"],[2,"width","68px"],[1,"text-end",2,"width","30px"],[2,"width","50px"],["id","thCost",1,"text-end",2,"width","80px"],[1,"text-end",2,"width","80px"],[1,"red",2,"width","30px"],[1,"text-end",2,"width","90px"],[1,"text-center"],["role","button",1,"btn","btn-outline-primary",3,"click"],["api","Report/ReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"onInputChange","onSelect"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block","mt-8","mb-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4",3,"innerHTML"],[1,"fst-italic","fw-bold",3,"innerHTML"],[1,"d-block"],[1,"text-danger","ms-3"],[1,"fw-bold"],["id","deliveryNote"],[1,"d-inline-block","fst-italic"],[1,"d-inline-block"],[1,"d-lg-block","mt-8","me-2","fw-bold","fst-italic"],[1,"status",3,"innerHTML"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"border-start","border-end"],[1,"table","table-sm","table-borderless"],[2,"width","645px"],[1,"lh-base"],[1,"fw-normal"],[1,"text-warning","inlineMarginLeft"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"d-block","fw-normal","fst-italic",3,"innerHTML"],[1,"fw-normal",2,"width","75px"],[1,"fw-normal","text-end",2,"width","42px"],[1,"fst-italic","small",2,"width","52px"],[1,"fw-normal","text-end",2,"width","80px"],[1,"fw-normal","text-end",2,"width","92px"],[1,"fw-normal","text-end","text-danger",2,"width","30px"],[1,"fw-normal","text-end",2,"width","102px"],[1,"text-end"],[1,"p-0","fw-normal","text-end",2,"width","1%"],[1,"fw-normal","text-end",2,"width","5%"]],template:function(a,s){a&1&&u(0,$n,30,6,"mainpanel-cmp",1),a&2&&f(s.data?0:-1)},dependencies:[N,B,Ie,te,Ne,ye,ki,wi,Z,dt,Si,vi,hi,xi],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{line-height:13px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:20px!important}"]})};function qn(n,l){n&1&&(i(0,"small",15),o(1,"*Enter a valid phone number"),t())}function zn(n,l){if(n&1&&u(0,qn,2,0,"small",15),n&2){m();let e=X(9);f(e.errors!=null&&e.errors.pattern?0:-1)}}function Qn(n,l){n&1&&(i(0,"small",15),o(1,"*Enter a valid email address"),t())}function Yn(n,l){if(n&1&&u(0,Qn,2,0,"small",15),n&2){m();let e=X(16);f(e.errors!=null&&e.errors.pattern?0:-1)}}var ht=class n{constructor(l,e,a,s,c){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=s;this.router=c;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",F.Error),this.dialogRef.close();return}this.httpService.post("/API/Subscription/SendSubscription",this.data.form).subscribe(e=>{this.toastr.success(e,F.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}static \u0275fac=function(e){return new(e||n)(p(E),p(Q),p(ne),p(R),p(xe))};static \u0275cmp=M({type:n,selectors:[["POS-modal-subscribe"]],standalone:!1,decls:26,vars:7,consts:[["validation","ngForm"],["phoneCtrl","ngModel"],["emailCtrl","ngModel"],[3,"onOk","onCancel","onClose","dynamicValidated","config"],[1,"container"],[1,"row"],[1,"col-6"],[1,"form-floating-outline"],["type","text","id","inputPhone","placeholder","Phone","name","phone","pattern","[0-9]{0,15}","required","","matTooltipPosition","above","matTooltip","Your number will be saved to help our customer service quickly identify you in the future",1,"form-control",3,"ngModelChange","ngModel"],["for","inputPhone"],["type","text","id","inputEmail","placeholder","Email","name","email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","","matTooltipPosition","above","matTooltip","Your monthly recurring invoice will be sent to the email you specified above",1,"form-control",3,"ngModelChange","ngModel"],["for","inputEmail"],[1,"col-12"],["name","note","id","inputNote","placeholder","Note","rows","6",1,"form-control",3,"ngModelChange","ngModel"],["for","inputNote"],[1,"text-danger"]],template:function(e,a){if(e&1){let s=v();i(0,"modal-material",3),b("onOk",function(P){return _(s),C(a.onOk(P))})("onCancel",function(){return _(s),C(a.dialogRef.close())})("onClose",function(){return _(s),C(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),D("ngModelChange",function(P){return _(s),T(a.data.form.Phone,P)||(a.data.form.Phone=P),C(P)}),t(),i(10,"label",9),o(11,"Phone*"),t(),u(12,zn,1,1),t()(),i(13,"div",6)(14,"div",7)(15,"input",10,2),D("ngModelChange",function(P){return _(s),T(a.data.form.Email,P)||(a.data.form.Email=P),C(P)}),t(),i(17,"label",11),o(18,"Email*"),t(),u(19,Yn,1,1),t()()(),i(20,"div",5)(21,"div",12)(22,"div",7)(23,"textarea",13),D("ngModelChange",function(P){return _(s),T(a.data.form.Note,P)||(a.data.form.Note=P),C(P)}),t(),i(24,"label",14),o(25,"Note"),t()()()()()()()()}if(e&2){let s=X(9),c=X(16);d("dynamicValidated",(s==null?null:s.valid)||(c==null?null:c.valid))("config",a.config),r(8),w("ngModel",a.data.form.Phone),r(4),f(s.touched&&s.dirty?12:-1),r(3),w("ngModel",a.data.form.Email),r(4),f(c.touched&&c.dirty?19:-1),r(4),w("ngModel",a.data.form.Note)}},dependencies:[ve,G,N,Se,ke,at,B,Oe,K,ge],encapsulation:2})};function Kn(n,l){if(n&1){let e=v();i(0,"div",20),b("click",function(){let s=_(e).$implicit,c=m(2);return C(c.onCycleChange(s.key))}),i(1,"div",21)(2,"span",22),o(3),t(),h(4,"div",23),t()()}if(n&2){let e=l.$implicit,a=m(2);_e(e.key==a.formData.Cycle?"active":""),r(3),x(e.dicount),r(),d("innerHTML",e.desc,q)}}function Jn(n,l){if(n&1){let e=v();i(0,"tr")(1,"th",24),o(2,"Register"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"input",25),D("ngModelChange",function(s){_(e);let c=m(2);return T(c.formData.Register,s)||(c.formData.Register=s),C(s)}),b("ngModelChange",function(){_(e);let s=m(2);return C(s.onQtyRegisterChange())}),t(),i(7,"span"),o(8),g(9,"number"),t()()()}if(n&2){let e=m(2);r(6),d("preventNegative",!0),w("ngModel",e.formData.Register),r(2),S("/ ",y(9,3,e.data.Options.Register))}}function Xn(n,l){if(n&1){let e=v();i(0,"div",6)(1,"div",26)(2,"div",8)(3,"h2",9),o(4,"Setup Fee "),t(),i(5,"small",10),o(6,"(One-time payment)"),t()()(),i(7,"div",19)(8,"table",27)(9,"tr")(10,"th"),o(11,"POS"),t(),i(12,"td"),o(13,"\xA0:"),t(),i(14,"td")(15,"label",28)(16,"radio-options",29),D("modelChange",function(s){_(e);let c=m(2);return T(c.data.Options.SetupFee,s)||(c.data.Options.SetupFee=s),C(s)}),b("modelChange",function(){_(e);let s=m(2);return C(s.calculateSetupFee())}),t()()()()()()()}if(n&2){let e=m(2);r(16),w("model",e.data.Options.SetupFee)}}function eo(n,l){n&1&&o(0," s ")}function to(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),o(3,"Additional Register"),t(),i(4,"p")(5,"small",37),o(6),t()()(),i(7,"td",32),o(8),t(),i(9,"td",33),h(10,"span",36),o(11),g(12,"number"),t(),i(13,"td",34),o(14),t(),i(15,"td",33),h(16,"span",36),o(17),g(18,"number"),t()()),n&2){let e=m(4);r(6),Ee("",e.formData.Register," Register",e.formData.Register>1?"s":""," "),r(2),x(e.formData.Cycle),r(2),d("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),r(),x(y(12,8,e.data.Options.Register)),r(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),r(2),d("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),r(),x(y(18,10,e.registerFee))}}function io(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong")(3,"span"),o(4,"POS"),t()(),i(5,"p")(6,"small",37),o(7," - Consultation "),h(8,"br"),o(9," - Training 2x "),h(10,"br"),o(11," - 1 Month Support Group"),t()()(),h(12,"td",32),i(13,"td",33)(14,"span"),o(15,"IDR "),t(),o(16),g(17,"number"),t(),h(18,"td",34),i(19,"td",33)(20,"span"),o(21,"IDR "),t(),o(22),g(23,"number"),t()()),n&2){let e=m(4);r(16),x(y(17,2,e.formData.Setup)),r(6),x(y(23,4,e.formData.Setup))}}function no(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),h(3,"span",36),t(),i(4,"p")(5,"small",37),o(6),u(7,eo,1,0),t()()(),i(8,"td",32),o(9),t(),i(10,"td",33),h(11,"span",36),o(12),g(13,"number"),t(),i(14,"td",34),o(15),t(),i(16,"td",33),h(17,"span",36),o(18),g(19,"number"),t()(),u(20,to,19,12,"tr"),u(21,io,24,6,"tr")),n&2){let e=m(3);r(3),d("innerHTML",e.formData.Type==1?"Starter Subscription":"Standard Subscription",q),r(3),S(" ",e.formData.Qty," Outlet"),r(),f(e.formData.Qty>1?7:-1),r(2),x(e.formData.Cycle),r(2),d("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),r(),x(y(13,11,e.data.Options.Type)),r(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),r(2),d("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),r(),x(y(19,13,e.outletFee)),r(2),f(e.formData.Register>0?20:-1),r(),f(e.data.Options.SetupFee?21:-1)}}function oo(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Sub Total"),t(),i(3,"td",39),o(4,":"),t(),i(5,"td",33)(6,"strong"),h(7,"span",36),o(8),g(9,"number"),t()()()),n&2){let e=m(4);r(7),d("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),r(),x(y(9,2,e.subTotal))}}function ao(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Tax (11%)"),t(),i(3,"td",39),o(4,":"),t(),i(5,"td",33)(6,"strong"),h(7,"span",36),o(8),g(9,"number"),t()()()),n&2){let e=m(4);r(7),d("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),r(),x(y(9,2,e.subTotal*.11))}}function ro(n,l){if(n&1&&(i(0,"div",35)(1,"table",38),u(2,oo,10,4,"tr"),u(3,ao,10,4,"tr"),i(4,"tr")(5,"th"),o(6,"Total"),t(),i(7,"td",39),o(8,":"),t(),i(9,"td",33)(10,"strong"),h(11,"span",36),o(12),g(13,"number"),t()()()()()),n&2){let e=m(3);r(2),f(e.data.vatEnabled?2:-1),r(),f(e.data.vatEnabled?3:-1),r(8),d("innerHTML",e.data.Options.Setup?"IDR ":"$ ",q),r(),S("",y(13,4,e.subTotal+(e.data.vatEnabled?e.subTotal*.11:0))," ")}}function lo(n,l){if(n&1&&(i(0,"div",19)(1,"table",30)(2,"thead",31)(3,"tr")(4,"th"),o(5,"Product"),t(),i(6,"th",32),o(7,"Month"),t(),i(8,"th",33),o(9,"Price"),t(),i(10,"th",34),o(11,"Disc"),t(),i(12,"th",33),o(13,"Total"),t()()(),i(14,"tbody"),u(15,no,22,15),t()(),u(16,ro,14,6,"div",35),t()),n&2){let e=m(2);r(15),f((e.formData==null?null:e.formData.Qty)>0?15:-1),r(),f((e.formData==null?null:e.formData.Qty)>0?16:-1)}}function so(n,l){n&1&&(i(0,"div",6)(1,"div",26)(2,"h2"),o(3,'Your payment currency is "IDR"'),t()(),i(4,"div",19)(5,"div",40)(6,"div",41)(7,"h2",42)(8,"button",43),o(9," I Want to pay in USD "),t()(),i(10,"div",44)(11,"div",45)(12,"ol",46)(13,"li",47),o(14," Go to setup menu"),t(),i(15,"li",47),o(16," Click tab currency"),t(),i(17,"li",47),o(18," Select the currency you want to make for payment"),t(),i(19,"li",47),o(20," Select Yes at primary currency box and click save"),t(),i(21,"li",48),o(22," Then you can check to my subscribe again "),t()(),i(23,"p",49),o(24,"For more detailed information, please check the following article: "),i(25,"a",50),o(26,"Added Currency Conversion"),t()()()()()()()())}function co(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1)(1,"actions")(2,"button",2),b("click",function(){_(e);let s=m();return C(s.onOpenSubscribeDialog())}),o(3,"Subscribe Now"),t()(),i(4,"content")(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"h2",9),o(12,"Subscribe "),t(),i(13,"small",10),o(14,"(Recurring)"),t()(),i(15,"a",11),b("click",function(){_(e);let s=m();return C(s.showRegister=!s.showRegister)}),o(16,"More"),t()(),i(17,"div",12)(18,"table",13)(19,"tr")(20,"th"),o(21,"Outlets"),t(),i(22,"td"),o(23,":"),t(),i(24,"td")(25,"input",14,0),D("ngModelChange",function(s){_(e);let c=m();return T(c.formData.Qty,s)||(c.formData.Qty=s),C(s)}),b("ngModelChange",function(){_(e);let s=m();return C(s.onQtyOutletChange())}),t(),i(27,"span"),o(28),g(29,"number"),t()()(),i(30,"tr")(31,"th"),o(32,"Cycle"),t(),i(33,"td"),o(34,":"),t(),i(35,"td"),W(36,Kn,5,4,"div",15,H),t()(),u(38,Jn,10,5,"tr"),t()()(),u(39,Xn,17,1,"div",6),t(),i(40,"div",16)(41,"div",6)(42,"div",17),b("click",function(){_(e);let s=m();return C(s.invoice=!s.invoice)}),i(43,"h2",18),o(44,"Invoice Preview"),t()(),u(45,lo,17,2,"div",19),t(),u(46,so,27,0,"div",6),t()()()()()}if(n&2){let e=m();d("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("hideMenu",!0),r(2),d("disabled",e.formData.Qty==0),r(23),d("preventNegative",!0),w("ngModel",e.formData.Qty),r(3),S("/ ",y(29,12,e.data.Type[0].amount)),r(8),U(e.data.DiscountOptions),r(2),f(e.showRegister?38:-1),r(),f(e.data.Options.Setup?39:-1),r(6),f(e.invoice?45:-1),r(),f(e.data.Options.Setup?46:-1)}}var xt=class n extends ut{constructor(e,a,s,c){super(e,a,"Subscription/MySubscriptionLoader",s);this.matDialog=c}showRegister=!1;invoice=!0;outletFee=0;registerFee=0;subTotal=0;postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(ht,{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)(p(le),p(E),p(ot),p(ee))};static \u0275cmp=M({type:n,selectors:[["POS-choose-plan"]],standalone:!1,features:[re],decls:1,vars:1,consts:[["outletQty","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu"],[1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","bg-light-gray","pb-10"],[1,"row","pt-5"],[1,"col-md-5","m-0","pe-0","pt-0","pb-0"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"card-body",2,"padding-right","0.625rem"],[1,"table-sm"],["type","text","autoNum","",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"class"],[1,"col-md-7"],[1,"card-header",3,"click"],[1,"title"],[1,"card-body"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"click"],[1,"card-body","text-center",2,"cursor","pointer","width","80px","padding","10px 5px"],[1,"fw-bold"],[1,"fw-normal","border-top","border-dark",3,"innerHTML"],["matTooltipPosition","above","matTooltip","Additional Register"],["type","text","autoNum","","maxlength","3",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card-header"],[1,"form-horizontal"],[1,"form-check","form-check-inline",2,"cursor","pointer","padding-top","8px"],["name","POS",3,"modelChange","model"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"min-width","65px"],[1,"text-end"],[1,"text-end",2,"min-width","85px"],[1,"d-flex","justify-content-end"],[3,"innerHTML"],[2,"font-size","90% !important"],[1,"table-sm","table-borderless","me-3"],[1,"sep"],["id","accordionExample",1,"accordion"],[1,"accordion-item"],["id","panelsStayOpen-headingTwo",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#panelsStayOpen-collapseTwo","aria-expanded","false","aria-controls","panelsStayOpen-collapseTwo",1,"accordion-button","collapsed"],["id","panelsStayOpen-collapseTwo","aria-labelledby","panelsStayOpen-headingTwo",1,"accordion-collapse","collapse"],[1,"accordion-body","pt-2"],[1,"list-group","list-group-numbered","mt-5","mb-3"],[1,"list-group-item","mb-3","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"list-group-item","rounded-0","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"ms-2","mt-6"],["href","https://support.dealpos.com/en/articles/8956190-how-to-create-new-currency","target","_blank"]],template:function(a,s){a&1&&u(0,co,47,14,"mainpanel-cmp",1),a&2&&f(s.data&&s.formData?0:-1)},dependencies:[G,N,di,B,te,bi,Ei,ge,Ce],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})};var St=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)(p(Q),p(ne),p(xe))};static \u0275cmp=M({type:n,selectors:[["POS-modal-choose-plan"]],standalone:!1,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),b("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&&(d("config",a.config),r(3),S(" ",a.data.body," "))},dependencies:[K],encapsulation:2})};var vt=class n{constructor(l,e,a,s){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=s;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",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Confirm",l).subscribe(e=>{this.toastr.success(e.Message,F.Success),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(p(E),p(Q),p(ne),p(R))};static \u0275cmp=M({type:n,selectors:[["POS-modal-confirm-adjusted-plan"]],standalone:!1,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),b("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),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(6,"label",4),o(7,"Reason"),t()()()()),e&2&&(d("config",a.config),r(5),w("ngModel",a.message))},dependencies:[G,N,ke,B,K,ge],encapsulation:2})};var Ae=class n{constructor(l,e,a,s){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=s;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",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",l).subscribe(e=>{this.toastr.success(e.Message,F.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(p(E),p(Q),p(ne),p(R))};static \u0275cmp=M({type:n,selectors:[["POS-modal-stop-subscription"]],standalone:!1,decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","200px",3,"ngModelChange","ngModel"],["for","message"]],template:function(e,a){e&1&&(i(0,"modal-material",0),b("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),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(4,"label",3),o(5,"Reason"),t()()()()),e&2&&(d("config",a.config),r(3),w("ngModel",a.message))},dependencies:[G,N,B,K],encapsulation:2})};var Re=class n{apiUrl="https://app.midtrans.com/snap/snap.js";injected=!1;initScript(){return new Ge(l=>{let e;this.injected||(e=document.createElement("script"),e.src=this.apiUrl,e.async=!0,e.setAttribute("data-client-key",Ue.midtransClientKey),this.injected=!0,document.body.appendChild(e))})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=fe({token:n,factory:n.\u0275fac,providedIn:"root"})};var mo=()=>["/menu/Profile/Main/My_Subscription/Choose_your_plan"],po=(n,l)=>({"bg-warning":n,"bg-danger":l}),uo=n=>({"background-color":n}),fo=n=>({"bg-gradient-warning":n});function _o(n,l){n&1&&(i(0,"a",1),o(1,"Choose Your Plan"),t()),n&2&&d("routerLink",et(1,mo))}function Co(n,l){if(n&1&&(i(0,"div",13),o(1),g(2,"date"),t()),n&2){let e=m(2);r(),S(" ",I(2,1,e.data.Zoho.Subscription.Since,"dd MMM yyyy")," ")}}function go(n,l){if(n&1&&(i(0,"div",15)(1,"div",31)(2,"h5",12),o(3," Subscription "),t(),i(4,"div",13),o(5),t()()()),n&2){let e=m(2);r(),_e(tt(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 bo(n,l){if(n&1&&(i(0,"span",35),o(1),g(2,"number"),t()),n&2){let e=m(3);r(),S("",y(2,1,e.data.Zoho.Subscription.Discount)," %")}}function ho(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),g(3,"number"),t(),h(4,"br"),t()),n&2){let e=m(3);r(2),x(y(3,1,e.data.Zoho.Subscription.TotalAmount))}}function xo(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"h2"),o(3,"Current Plan"),t()(),i(4,"div",24)(5,"table",25)(6,"thead",26)(7,"tr")(8,"th",32),o(9,"Usage"),t(),i(10,"th",32),o(11,"Frequency"),t(),i(12,"th",33),o(13,"Amount"),t()()(),i(14,"tbody")(15,"tr")(16,"td",34),o(17),h(18,"br"),o(19),g(20,"number"),i(21,"small"),o(22,"month"),t(),o(23,") "),t(),i(24,"td",34)(25,"span"),o(26),h(27,"br"),t(),u(28,bo,3,3,"span",35),t(),i(29,"td",34),u(30,ho,5,3,"span"),i(31,"span"),o(32),g(33,"number"),t()()()()()()()),n&2){let e=m(2);r(17),S(" ",e.data.Zoho.Subscription.OutletCount," Outlet"),r(2),S(" (",y(20,6,e.data.Zoho.Subscription.RecurringAmount)," / "),r(7),x(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),f(e.data.Zoho.Subscription.Discount!=0?28:-1),r(2),f(e.data.Zoho.Subscription.Discount!=0?30:-1),r(2),x(y(33,8,e.data.Zoho.Subscription.TotalAfterDiscount))}}function So(n,l){if(n&1&&(i(0,"span",35),o(1),g(2,"number"),t()),n&2){let e=m(3);r(),S("",y(2,1,e.data.Zoho.Subscription.Discount)," %")}}function vo(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),g(3,"number"),t(),h(4,"br"),t()),n&2){let e=m(3);r(2),x(y(3,1,e.data.NextBilling.TotalAmount))}}function yo(n,l){if(n&1){let e=v();i(0,"div",5)(1,"div",6)(2,"div")(3,"h2"),o(4,"Adjusted Plan"),t()(),i(5,"div",36)(6,"button",37),b("click",function(){_(e);let s=m(2);return C(s.onOpenConfirmAdjustedModal())}),o(7," Confirm "),t()()(),i(8,"div",24)(9,"table",25)(10,"thead",26)(11,"tr")(12,"th",32),o(13,"Usage"),t(),i(14,"th",32),o(15,"Frequency"),t(),i(16,"th",33),o(17,"Amount"),t()()(),i(18,"tbody")(19,"tr")(20,"td",34),o(21),h(22,"br"),o(23),g(24,"number"),i(25,"small"),o(26,"month"),t(),o(27,") "),t(),i(28,"td",34)(29,"span"),o(30),h(31,"br"),t(),u(32,So,3,3,"span",35),t(),i(33,"td",34),u(34,vo,5,3,"span"),i(35,"span"),o(36),g(37,"number"),t()()()()()()()}if(n&2){let e=m(2);r(21),S(" ",e.data.NextBilling.Outlet," Outlet"),r(2),S(" (",y(24,6,e.data.NextBilling.RecurringAmount)," / "),r(7),x(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==3?"3 Monthly":"6 Months"),r(2),f(e.data.Zoho.Subscription.Discount!=0?32:-1),r(2),f(e.data.Zoho.Subscription.Discount!=0?34:-1),r(2),x(y(37,8,e.data.NextBilling.TotalAfterDiscount))}}function Mo(n,l){if(n&1&&(i(0,"tr")(1,"th",40),o(2,"Withholding Tax"),t(),i(3,"td"),o(4,":"),t(),i(5,"td"),o(6),t()()),n&2){let e=m(3);r(6),S(" ",e.data.Zoho.WHTPercentage," % ")}}function wo(n,l){if(n&1&&(i(0,"tr")(1,"th",40),o(2,"Document Link"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"a",41),h(7,"i",42),o(8," Upload "),t()()()),n&2){let e=m(3);r(6),d("href",We(e.data.Zoho.DocumentLink),he)}}function To(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"h2"),h(3,"i",38),o(4,"Tax Information"),t()(),i(5,"div",8)(6,"table",39),u(7,Mo,7,1,"tr"),u(8,wo,9,2,"tr"),t()()()),n&2){let e=m(2);r(7),f(e.data.Zoho.WHTPercentage>0?7:-1),r(),f(e.data.Zoho.DocumentLink?8:-1)}}function Do(n,l){if(n&1){let e=v();i(0,"a",55),b("click",function(){_(e);let s=m(3);return C(s.payAllInvoice())}),h(1,"i",56),o(2),g(3,"Filter"),g(4,"sum"),g(5,"Filter"),g(6,"sum"),g(7,"number"),t()}if(n&2){let e=m(3);r(2),S(" Pay All ~ IDR ",y(7,15,I(4,5,Pe(3,1,e.data.Zoho.invoices,"overdue","status"),"total")+I(6,12,Pe(5,8,e.data.Zoho.invoices,"sent","status"),"total"))," ")}}function Eo(n,l){if(n&1&&(i(0,"p",57),o(1),g(2,"number"),t()),n&2){let e=m().$implicit;r(),S("(",y(2,1,e.balance)," due)")}}function Po(n,l){if(n&1&&(i(0,"a",60),h(1,"i",62),i(2,"span",63),o(3,"View"),t()()),n&2){let e=m().$implicit;d("href",We(e.invoice_url),he)}}function Io(n,l){if(n&1){let e=v();i(0,"button",64),b("click",function(){_(e);let s=m().$implicit,c=m(3);return C(c.paySingleInvoice(s))}),h(1,"i",56),i(2,"span",63),o(3,"Pay Now"),t()()}if(n&2){let e=m().$implicit;d("id",Xt("pay-button",e.invoice_number))}}function Oo(n,l){if(n&1&&(i(0,"tr",30)(1,"td"),o(2),t(),i(3,"td"),o(4),g(5,"date"),t(),i(6,"td"),o(7),t(),i(8,"td",50),o(9),g(10,"number"),u(11,Eo,3,3,"p",57),t(),i(12,"td"),o(13),t(),i(14,"td",58),o(15),t(),i(16,"td",59),u(17,Po,4,2,"a",60),u(18,Io,4,2,"button",61),t()()),n&2){let e=l.$implicit,a=l.$index;Xe(A(16,uo,e.status=="overdue"?"#f2dede":"")),r(2),x(a+1+"."),r(2),x(I(5,11,e.date,"dd MMM yyyy")),r(3),x(e.invoice_number),r(2),S(" ",y(10,14,e.total)," "),r(2),f(e.total!=e.balance&&e.balance>0?11:-1),r(2),x(e.currency_code),r(2),x(e.status),r(2),f(e.status!="draft"&&e.status!="void"?17:-1),r(),f((e.status=="sent"||e.status=="overdue")&&e.currency_code=="IDR"?18:-1)}}function ko(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"div",43)(3,"h2",44),h(4,"i",45),o(5," Invoices"),t()(),u(6,Do,8,17,"a",46),t(),i(7,"div",24)(8,"table",47)(9,"thead",26)(10,"tr")(11,"th",27),o(12,"No"),t(),i(13,"th",48),o(14,"Date"),t(),i(15,"th",49),o(16,"Number"),t(),i(17,"th",50),o(18,"Amount"),t(),h(19,"th",51),i(20,"th",52),o(21,"Status"),t(),i(22,"th"),o(23,"Invoice"),t()()(),i(24,"tbody"),W(25,Oo,19,18,"tr",53,H),t()(),i(27,"p",54),o(28," Please pay your biling directly inside our platform. We provide multiple methods ex: Credit Card/Bank Transfer/E-Money. "),t()()()),n&2){let e=m(2);r(6),f(e.outstandingInvoiceCount>1&&e.data.Zoho.Subscription.Currency=="RP"?6:-1),r(19),U(e.data.Zoho.invoices)}}function Fo(n,l){if(n&1){let e=v();i(0,"button",65),b("click",function(){_(e);let s=m(2);return C(s.load())}),o(1," Load "),t()}}function No(n,l){if(n&1&&(i(0,"tr",30)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",50),o(6),g(7,"number"),t(),i(8,"td",50),o(9),t(),i(10,"td",50),o(11),g(12,"date"),t(),i(13,"td",50),o(14),g(15,"date"),t()()),n&2){let e=l.$implicit,a=l.$index;r(2),x(a+1+"."),r(2),x(e.Name),r(),_e(A(16,fo,e.OrdersCount<25)),r(),S(" ",y(7,8,e.OrdersCount)),r(3),x(e.RegisterCount),r(2),x(I(12,10,e.MinDate,"dd MMM yyyy")),r(3),x(I(15,13,e.MaxDate,"dd MMM yyyy"))}}function Vo(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",0)(1,"actions"),u(2,_o,2,2,"a",1),t(),i(3,"content")(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"h2"),h(10,"i",7),o(11," Account"),t()(),i(12,"div",8)(13,"div",9)(14,"div",10)(15,"div",11)(16,"h5",12),o(17," Since "),t(),u(18,Co,3,4,"div",13),t()(),i(19,"div",14)(20,"div",11)(21,"h5",12),o(22," Type "),t(),i(23,"div",13),o(24),t()()(),u(25,go,6,6,"div",15),t()()(),u(26,xo,34,10,"div",5),u(27,yo,38,10,"div",5),u(28,To,9,2,"div",5),i(29,"div",5)(30,"div",6)(31,"h2"),h(32,"i",16),o(33," Close Store"),t()(),i(34,"div",8)(35,"div"),o(36," You can close your store to stop your billing. "),t(),i(37,"div",17)(38,"button",18),b("click",function(){_(e);let s=m();return C(s.onOpenCloseModal())}),o(39," Close "),t()()()()(),i(40,"div",19),u(41,ko,29,1,"div",5),i(42,"div",5)(43,"div",20)(44,"h2"),h(45,"i",21),o(46," Outlets Usage "),i(47,"small",22),o(48),g(49,"date"),g(50,"date"),t()(),u(51,Fo,2,0,"button",23),t(),i(52,"div",24)(53,"table",25)(54,"thead",26)(55,"tr")(56,"th",27),o(57,"No"),t(),i(58,"th"),o(59,"Outlet Name"),t(),i(60,"th",28),o(61,"Orders"),t(),i(62,"th",28),o(63,"Registers"),t(),i(64,"th",29),o(65,"Min Date"),t(),i(66,"th",29),o(67,"Max Date"),t()()(),i(68,"tbody"),W(69,No,16,18,"tr",30,H),g(71,"sortBy"),t()()()()()()()()()}if(n&2){let e=m();d("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(2),f(e.data.Account.Type=="Trial"?2:-1),r(16),f(e.data.Zoho.Subscription?18:-1),r(6),S(" ",e.data.Account.Type," "),r(),f(e.data.Zoho.CustomerID!=null?25:-1),r(),f(e.data.Zoho.Subscription!=null?26:-1),r(),f(e.data.Zoho.Subscription!=null&&e.data.NextBilling&&e.data.Billed>e.data.Zoho.Subscription.OutletCount?27:-1),r(),f(e.data.Zoho.WHTPercentage>0||e.data.Zoho.DocumentLink?28:-1),r(13),f(e.data.Zoho.invoices&&e.data.Zoho.invoices.length>0?41:-1),r(7),Ee("(",I(49,14,e.data.From,"dd MMM yyyy")," - ",I(50,17,e.data.To,"dd MMM yyyy"),")"),r(3),f(e.data.Outlets.length==0?51:-1),r(18),U(Pe(71,20,e.data.Outlets,"desc","OrdersCount"))}}var yt=class n extends Ci{constructor(e,a,s,c,P,z){super(e);this.httpService=a;this.matDialog=s;this.midtrans=c;this.ngZone=P;this.toastr=z;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,j.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(St,{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+=`
|
|
3
3
|
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(a,F.Success)}payAllInvoice(){let e=0,a,s,c,P;this.data.Zoho.invoices.forEach(O=>{(O.status=="sent"||O.status=="overdue")&&(e+=O.total,s==null?(a=O.invoice_number,s=O.invoice_number.concat("$"+O.total+";"),c=O.invoice_id,P=O.invoice_id.concat("$"+O.total+";")):(a=a.concat("_"+O.invoice_number),s=s.concat(O.invoice_number.concat("$"+O.total+";")),c=c.concat(";"+O.invoice_id),P=P.concat(O.invoice_id.concat("$"+O.total)+";")))});let z={CustomerID:this.data.Zoho.invoices[0].customer_id,InvNumber:s,OrderID:a,GrossAmount:e,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:P};this.httpService.post("/API/Subscription/GetSNAPTokenMultipleInvoice",z).subscribe(O=>{this.openSNAPDialog(O)})}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(s=>{this.openSNAPDialog(s)})}openSNAPDialog(e){let a=this.data.Account.SubscriptionStatus;snap.pay(e.token,{onSuccess:s=>{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)(p(le),p(E),p(ee),p(Re),p(Ye),p(R))};static \u0275cmp=M({type:n,selectors:[["POS-my-subscription"]],standalone:!1,features:[re],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success",3,"routerLink"],[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"],[1,"mt-4","h6"],[1,"col","pe-3","ps-3"],[1,"col","ps-0","pe-3"],[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"],[1,"btn","btn-outline-secondary"],[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"],[1,"border"],[1,"p-3","border","rounded","bg-success","text-white"],[1,"text-center"],[1,"text-center",2,"width","104px"],[1,"text-center","align-top"],[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"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm"],["id","tableGrid",1,"table","mt-5"],[2,"width","120px"],[2,"width","100px"],[1,"text-end"],[2,"width","60px"],[2,"width","80px"],[1,"border",3,"style"],[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,"fst-italic","text-warning"],[1,"text-uppercase"],[1,"d-flex","justify-content-between"],["target","_blank",3,"href"],[2,"border-width","1px",3,"id"],[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,s){a&1&&u(0,Vo,72,24,"mainpanel-cmp",0),a&2&&f(s.data?0:-1)},dependencies:[Ie,te,ge,Ce,Z,dt,yi,pt],encapsulation:2})};function Ao(n,l){n&1&&(i(0,"div",10)(1,"h5",12),h(2,"i",13),o(3," You are not listening to any outlet. Please select one. "),t()())}function Ro(n,l){if(n&1&&(i(0,"div",11)(1,"h5",12),h(2,"i",13),o(3),t()()),n&2){let e=m(2);r(3),S(" You are currently listening to ",e.selectedOutlet==null?null:e.selectedOutlet.Name,". ")}}function Bo(n,l){if(n&1&&(i(0,"div",2)(1,"div",9),u(2,Ao,4,0,"div",10),u(3,Ro,4,1,"div",11),t()()),n&2){let e=m();r(2),f(e.selectedOutlet?-1:2),r(),f(e.selectedOutlet?3:-1)}}var Mt=class n{constructor(l,e,a,s){this.signalrClientService=l;this.httpService=e;this.dialogRef=a;this.toastr=s;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(me(l=>j.IsNotEmpty(l))).subscribe(l=>{this.entities=l.Options.Entities,j.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,j.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?j.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"),s={EntityID:this.outletID};this.httpService.post("/api/PushNotification/Subscribe",s).subscribe(c=>{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)(p(si),p(E),p(Q),p(R))};static \u0275cmp=M({type:n,selectors:[["POS-modal-subscribe-notification"]],standalone:!1,decls:11,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container"],[1,"row"],[1,"row","mt-1"],[1,"col-md-2"],[1,"pt-10"],[1,"col-md-10"],[1,"form-floating-outline","selected"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Options","id","outlet",1,"productform",3,"open","clear","ngModelChange","change","items","ngModel"],[1,"col-12"],[1,"alert","alert-danger"],[1,"alert","alert-success"],[1,"d-flex"],["aria-hidden","true",1,"fa-solid","fa-circle-info","me-3","mt-1"]],template:function(e,a){e&1&&(i(0,"modal-material",0),b("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()})("onClose",function(){return a.onCancel()}),i(1,"content")(2,"div",1),u(3,Bo,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),b("open",function(){return a.onOpenSelectOutlet()})("clear",function(){return a.onOpenSelectOutlet()}),D("ngModelChange",function(c){return T(a.outletID,c)||(a.outletID=c),c}),b("change",function(c){return a.onSelectOutlet(c)}),t()()()()()()()),e&2&&(d("config",a.modalConfig),r(3),f(a.touchOnSelectOption?-1:3),r(7),d("items",a.entities),w("ngModel",a.outletID))},dependencies:[N,B,K,ye],encapsulation:2})};var jo=n=>({ID:n});function Ho(n,l){if(n&1&&(i(0,"a",15),o(1),t()),n&2){let e=m().$implicit;d("routerLink","/menu"+e.URL)("queryParams",A(3,jo,e.ObjectID)),r(),S(" ",e.Body," ")}}function Wo(n,l){if(n&1&&(i(0,"a",16),o(1),t()),n&2){let e=m().$implicit;d("href",We(e.URL),he),r(),S(" ",e.Body," ")}}function Uo(n,l){if(n&1&&(i(0,"tr",13)(1,"td"),o(2),t(),i(3,"td")(4,"b"),o(5),t(),h(6,"br"),i(7,"span"),u(8,Ho,2,5,"a",15),u(9,Wo,2,3,"a",16),t()(),i(10,"td"),o(11),g(12,"date"),t(),i(13,"td"),o(14),t()()),n&2){let e=l.$implicit;r(2),x(e.OutletName),r(3),x(e.Header),r(3),f(e.ObjectIDType>0?8:-1),r(),f(e.ObjectIDType==0?9:-1),r(2),x(I(12,6,e.Created,"dd MMM yyyy HH:mm")),r(3),x(e.TypeString)}}function Zo(n,l){if(n&1){let e=v();i(0,"mat-paginator",17),b("page",function(s){_(e);let c=m(2);return C(c.onPaginationChange(s))}),t()}if(n&2){let e=m(2);d("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Go(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1),b("onSubmit",function(){_(e);let s=m();return C(s.searchFromPageOne())}),i(1,"actions")(2,"a",2),b("click",function(){_(e);let s=m();return C(s.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),D("ngModelChange",function(s){_(e);let c=m();return T(c.pageData.Filter.ListIDs,s)||(c.pageData.Filter.ListIDs=s),C(s)}),t()(),i(11,"div")(12,"h6"),o(13,"From"),t(),i(14,"datepicker",6),D("dateChange",function(s){_(e);let c=m();return T(c.pageData.Filter.From,s)||(c.pageData.Filter.From=s),C(s)}),t()(),i(15,"div")(16,"h6"),o(17,"To"),t(),i(18,"datepicker",7),D("dateChange",function(s){_(e);let c=m();return T(c.pageData.Filter.To,s)||(c.pageData.Filter.To=s),C(s)}),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"),W(33,Uo,15,9,"tr",13,H),t()(),i(35,"div"),u(36,Zo,1,3,"mat-paginator",14),t()()()()}if(n&2){let e=m();d("pageData",e.menuData)("hideSearchBox",!0),r(10),d("items",e.pageData.Options.Entities),w("ngModel",e.pageData.Filter.ListIDs),d("multiple",!0),r(4),w("date",e.pageData.Filter.From),r(4),w("date",e.pageData.Filter.To),r(15),U(e.data.Data),r(3),f(e.pagination.listTotal>0?36:-1)}}var wt=class n extends Fe{constructor(e,a,s){super(e,a,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList");this.dialog=s}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(Mt)}static \u0275fac=function(a){return new(a||n)(p(le),p(E),p(ee))};static \u0275cmp=M({type:n,selectors:[["POS-notification"]],standalone:!1,features:[re],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],["role","button",1,"btn","btn-success",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel","multiple"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","200px"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],[3,"page","length","pageSize","pageIndex"]],template:function(a,s){a&1&&u(0,Go,37,8,"mainpanel-cmp",0),a&2&&f(s.data?0:-1)},dependencies:[N,B,Ie,te,ct,Ne,ye,Z],encapsulation:2})};var se=class n{_loadSubscriptionData=new $e(null);loadSubscriptionData$=this._loadSubscriptionData.asObservable();subscriptionData$;lastUnpaidInvoiceDate$;constructor(l){this.subscriptionData$=this.loadSubscriptionData$.pipe(ie(()=>l.get("/API/Subscription/GetInitialData").pipe(ze(e=>{let a=0;e.Subscription?.SubscriptionState=="Overdue"?a=1:e.Subscription?.SubscriptionState=="Sell Only"?a=2:e.Subscription?.SubscriptionState=="Suspended"&&(a=3),j.IsNotEmpty(e.Subscription)&&(e.Subscription.SubscriptionStatus=a)}))),qe(1)),this.lastUnpaidInvoiceDate$=this.subscriptionData$.pipe(ce(e=>e.invoices.filter(a=>(a.status=="sent"||a.status=="overdue")&&a.currency_code=="IDR")),ce(e=>e.length>0?e[0].date:"-"))}loadSubscriptionData(){this._loadSubscriptionData.next()}static \u0275fac=function(e){return new(e||n)(ae(E))};static \u0275prov=fe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Be=class n{constructor(l,e){l.subscriptionData$.pipe(me(s=>s.code!=200),ie(()=>zt(e.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"])))).subscribe()}static \u0275fac=function(e){return new(e||n)(ae(se),ae(xe))};static \u0275prov=fe({token:n,factory:n.\u0275fac,providedIn:"root"})};var we=class n{outlets$;from$;to$;_isLoadOutlet=new $e(!1);isLoadOutlet$=this._isLoadOutlet.asObservable().pipe(me(l=>l));showLoadButton$;constructor(l,e){let a=this.isLoadOutlet$.pipe(ie(()=>l.post("/API/Subscription/GetUsage").pipe()),qe(1));this.outlets$=a.pipe(ce(s=>s.Outlets)),this.from$=a.pipe(ce(s=>s.From)),this.to$=a.pipe(ce(s=>s.To)),e.subscriptionData$.pipe(me(s=>s.Subscription?.OutletCount<=Ue.outletMaximumSubscription),ze(()=>this.loadOutlet())).subscribe(),this.showLoadButton$=Qt(e.subscriptionData$.pipe(ce(s=>s.Subscription?.OutletCount>Ue.outletMaximumSubscription),Yt(1)),a.pipe(ce(()=>!1)))}loadOutlet(){this._isLoadOutlet.next(!0)}static \u0275fac=function(e){return new(e||n)(ae(E),ae(se))};static \u0275prov=fe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Dt=class n{constructor(l,e,a){this.http=l;this.ngZone=e;this.toastr=a}payInvoice(l,e,a,s){let c={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",c).pipe(ie(P=>this.openSNAPDialog(P,s)))}payAllInvoices(l,e,a,s){let c=0,P,z,O,ue;l.forEach($=>{($.status=="sent"||$.status=="overdue")&&(c+=$.total,z==null?(P=$.invoice_number,z=$.invoice_number.concat("$"+$.total+";"),O=$.invoice_id,ue=$.invoice_id.concat("$"+$.total+";")):(P=P.concat("_"+$.invoice_number),z=z.concat($.invoice_number.concat("$"+$.total+";")),O=O.concat(";"+$.invoice_id),ue=ue.concat($.invoice_id.concat("$"+$.total)+";")))});let Le={CustomerID:l[0].customer_id,InvNumber:z,OrderID:P,GrossAmount:c,WHTPercentage:e,VATEnabled:a,InvoiceID:ue};return this.http.post("/API/Subscription/GetSNAPTokenMultipleInvoice",Le).pipe(ie($=>this.openSNAPDialog($,s)))}openSNAPDialog(l,e){let a=e;return new Ge(s=>{snap.pay(l.token,{onSuccess:()=>{this.ngZone.run(()=>{this.showToaster(a),s.next(),s.complete()})}})})}showToaster(l){let e="Payment Successful!";l>1&&(e+=`
|
|
4
4
|
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(e,F.Success)}static \u0275fac=function(e){return new(e||n)(ae(E),ae(Ye),ae(R))};static \u0275prov=fe({token:n,factory:n.\u0275fac,providedIn:"root"})};var zo=n=>({"background-color":n});function Qo(n,l){if(n&1){let e=v();i(0,"button",10),b("click",function(){_(e);let s=m();return C(s.payAllInvoices())}),o(1),g(2,"number"),t()}if(n&2){let e=m();r(),S("PAY ALL - ",e.currency+" "+y(2,1,e.totalPayable))}}function Yo(n,l){if(n&1&&(i(0,"a",15),o(1),t()),n&2){let e=m().$implicit;d("href",e.invoice_url,he),r(),x(e.invoice_number)}}function Ko(n,l){if(n&1&&(i(0,"span"),o(1),t()),n&2){let e=m().$implicit;r(),x(e.invoice_number)}}function Jo(n,l){if(n&1){let e=v();i(0,"button",21),b("click",function(){_(e);let s=m().$implicit,c=m();return C(c.payInvoice(s))}),o(1,"Pay"),t()}}function Xo(n,l){if(n&1&&(i(0,"button",20),o(1),t()),n&2){let e=m().$implicit;r(),x(e.status)}}function ea(n,l){if(n&1&&(i(0,"div",11)(1,"div",12)(2,"div",13)(3,"h3",14),u(4,Yo,2,2,"a",15)(5,Ko,2,1,"span"),t(),i(6,"small",5),o(7),g(8,"date"),t(),i(9,"small",16),o(10),g(11,"date"),t()(),i(12,"div",17)(13,"span",18),o(14),g(15,"number"),t(),u(16,Jo,2,0,"button",19)(17,Xo,2,1,"button",20),t()()()),n&2){let e=l.$implicit,a=m();Xe(A(16,zo,e.status=="overdue"?"#f2dede":"")),r(4),f(e.invoice_url?4:5),r(3),S("Invoice Date: ",I(8,8,e.date,"dd MMM yyyy")),r(3),S("Due Date: ",I(11,11,e.date,"dd MMM yyyy")),r(4),Ee("",a.currency," ",y(15,14,e.total)),r(2),f(e.status=="sent"||e.status=="overdue"?16:17)}}var Et=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){j.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)(p(Dt),p(se),p(xe))};static \u0275cmp=M({type:n,selectors:[["POS-invoices-card"]],inputs:{invoices:"invoices",WHTPercentage:"WHTPercentage",VATEnabled:"VATEnabled",subscriptionStatus:"subscriptionStatus",currency:"currency"},standalone:!1,decls:14,vars:3,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between",2,"padding-left","15px"],[1,"d-flex","align-items-center"],[1,"fa-solid","fa-file-invoice","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-primary","btn-pay"],[1,"card-body","px-0"],[1,"row","gx-0"],[1,"invoice-list","col-12",2,"padding","0px 15px",3,"style"],[1,"btn","btn-sm","btn-outline-primary","btn-pay",3,"click"],[1,"invoice-list","col-12",2,"padding","0px 15px"],[1,"py-10","border-top","d-flex","justify-content-between"],[1,"invoice-info"],[1,"fw-normal"],["target","_blank",3,"href"],[1,"sub-text"],[1,"invoice-payment","text-end","d-flex","flex-column","justify-content-between"],[1,"d-block","invoice-total"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2"],["disabled","",1,"btn","btn-sm","btn-outline-secondary","btn-pay","text-uppercase","py-2"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2",3,"click"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),h(3,"i",3),i(4,"div")(5,"h3",4),o(6,"Invoices"),t(),i(7,"small",5),o(8,"Invoice are created for each subscription cycle."),t()()(),u(9,Qo,3,3,"button",6),t(),i(10,"div",7)(11,"div",8),W(12,ea,18,18,"div",9,H),t()()()),e&2&&(r(9),f(a.showPayAll&&a.currency!="USD"?9:-1),r(),Je("pb-0",a.invoices.length==1),r(2),U(a.invoices))},dependencies:[Ce,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 Pt=class n{subscribedSince;outlets;frequency;total;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["POS-billing-info-card"]],inputs:{subscribedSince:"subscribedSince",outlets:"outlets",frequency:"frequency",total:"total"},standalone:!1,decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"card-body"],[1,"bill-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"]],template:function(e,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),g(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()(),h(15,"div",7),i(16,"div")(17,"h3",5),o(18),t(),i(19,"h5",6),o(20,"Frequency"),t()(),h(21,"div",7),i(22,"div")(23,"h3",5),o(24),g(25,"number"),t(),i(26,"h5",6),o(27,"Amount"),t()()()()()),e&2&&(r(6),S("Subscribe Since: ",I(7,4,a.subscribedSince,"dd MMM yyyy")),r(6),x(a.outlets),r(6),S("",a.frequency," Month"),r(6),x(y(25,7,a.total)))},dependencies:[Ce,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 Zt=n=>({"is-invalid":n});function na(n,l){n&1&&(i(0,"div",7),o(1,"Email is required."),t())}function oa(n,l){n&1&&(i(0,"div",7),o(1,"Phone is required."),t())}function aa(n,l){n&1&&h(0,"div",7)}var It=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=Te(pi);data=Te(ne);config=new Y;generateForm(){this.form=this.fb.group({email:this.fb.control(null,[jt.required]),phone:this.fb.control(null,[jt.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)(p(Q),p(ne),p(R))};static \u0275cmp=M({type:n,selectors:[["POS-dialog-update-billing"]],standalone:!1,decls:25,vars:15,consts:[[3,"onOk","onCancel","onClose","config","dynamicValidated"],[3,"formGroup"],[1,"mb-3","row"],["for","email",1,"col-4","fs-4"],[1,"text-danger","ms-2"],[1,"col"],["type","text","formControlName","email","id","email",1,"form-control","rounded",3,"ngClass"],["id","",1,"invalid-feedback"],["for","phone",1,"col-4","fs-4"],["formControlName","phone","type","text","id","phone",1,"form-control","rounded",3,"ngClass"],["for","mobilePhone",1,"col-4","fs-4"],["formControlName","mobilePhone","type","text","id","mobilePhone",1,"form-control","rounded",3,"ngClass"]],template:function(e,a){e&1&&(i(0,"modal-material",0),b("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),h(9,"input",6),u(10,na,2,0,"div",7),t()(),i(11,"div",2)(12,"label",8),o(13,"Phone"),i(14,"sup",4),o(15,"*"),t()(),i(16,"div",5),h(17,"input",9),u(18,oa,2,0,"div",7),t()(),i(19,"div",2)(20,"label",10),o(21,"Mobile Phone"),t(),i(22,"div",5),h(23,"input",11),u(24,aa,1,0,"div",7),t()()()()()),e&2&&(d("config",a.config)("dynamicValidated",a.form.valid),r(2),d("formGroup",a.form),r(7),d("ngClass",A(9,Zt,a.form.controls.email.invalid&&(a.form.controls.email.dirty||a.form.controls.email.touched))),r(),f(a.form.controls.email.errors!=null&&a.form.controls.email.errors.required?10:-1),r(7),d("ngClass",A(11,Zt,a.form.controls.phone.invalid&&(a.form.controls.phone.dirty||a.form.controls.phone.touched))),r(),f(a.form.controls.phone.errors!=null&&a.form.controls.phone.errors.required?18:-1),r(5),d("ngClass",A(13,Zt,a.form.controls.mobilePhone.invalid&&(a.form.controls.mobilePhone.dirty||a.form.controls.mobilePhone.touched))),r(),f(a.form.controls.mobilePhone.errors?24:-1))},dependencies:[nt,ve,G,N,Se,ci,mi,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 Ot=class n{constructor(l,e,a,s){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=s;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",F.Error);return}this.month==0&&this.toastr.error("Month must be bigger than zero",F.Error),this.httpService.post("/api/subscription/pause",l).subscribe(e=>{this.toastr.success(e.Message,F.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(p(E),p(Q),p(ne),p(R))};static \u0275cmp=M({type:n,selectors:[["POS-dialog-pause-subscription"]],decls:15,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"],[1,"form-floating-outline","mt-5"],["type","text","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","message"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","220px",3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(i(0,"modal-material",0),b("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(),h(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),D("ngModelChange",function(c){return T(a.month,c)||(a.month=c),c}),t(),i(9,"label",4),o(10,"Months"),t()(),i(11,"div",5)(12,"textarea",6),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(13,"label",4),o(14,"Reason"),t()()()()),e&2&&(d("config",a.config),r(8),w("ngModel",a.month),r(4),w("ngModel",a.message))},dependencies:[mt,K,rt,G,N,B],encapsulation:2})};var kt=class n{constructor(l,e,a){this.matDialog=l;this.http=e;this.toastr=a;ti(()=>{this.updateBillingOnPageLoad()&&this.updateBilling()})}updateBillingOnPageLoad=ii();lastUnpaidInvoiceDate;email;phone;mobilePhone;recurringStatus;cancel(){this.matDialog.open(Ae).afterClosed().subscribe()}pause(){this.matDialog.open(Ot).afterClosed().subscribe()}updateBilling(){this.matDialog.open(It,{data:{email:this.email,phone:this.phone,mobilePhone:this.mobilePhone}}).afterClosed().pipe(me(l=>j.IsNotEmpty(l)),ie(l=>this.http.post("/API/Subscription/UpdateBillingData",{Email:l.email,Phone:l.phone,Mobile:l.mobilePhone}).pipe(ce(e=>$t(Gt({},l),{Message:e.Message}))))).subscribe(l=>{this.toastr.success(l.Message,F.Success),this.email=l.email,this.phone=l.phone,this.mobilePhone=l.mobilePhone})}static \u0275fac=function(e){return new(e||n)(p(ee),p(E),p(R))};static \u0275cmp=M({type:n,selectors:[["POS-renewal-card"]],inputs:{updateBillingOnPageLoad:[1,"updateBillingOnPageLoad"],lastUnpaidInvoiceDate:"lastUnpaidInvoiceDate",email:"email",phone:"phone",mobilePhone:"mobilePhone",recurringStatus:"recurringStatus"},standalone:!1,decls:40,vars:16,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text","text-capitalize"],[1,"btn-group"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],[1,"dropdown-item",3,"click"],[1,"card-body"],[1,"renewal-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"text-center","invdate-container",2,"flex-grow","1"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"],[1,"d-flex","flex-column","ps-0","ps-sm-10","emwa-container",2,"flex-grow","2.5"],[1,"mt-sm-4","mt-8"]],template:function(e,a){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),h(9,"b",5),t(),i(10,"ul",6)(11,"li")(12,"a",7),b("click",function(){return a.updateBilling()}),o(13,"Update Billing Contact"),t()(),i(14,"li")(15,"a",7),b("click",function(){return a.pause()}),o(16,"Pause Subscription"),t()(),i(17,"li")(18,"a",7),b("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),g(25,"date"),t(),i(26,"h5",12),o(27,"Invoice Date"),t()(),h(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&&(r(5),Je("text-success",a.recurringStatus=="active")("text-danger",a.recurringStatus=="stopped"),r(),x(a.recurringStatus),r(18),x(a.lastUnpaidInvoiceDate=="-"?a.lastUnpaidInvoiceDate:I(25,13,a.lastUnpaidInvoiceDate,"dd MMM yyyy")),r(8),x(a.email??"-"),r(5),Bt("",a.phone," ",a.phone&&a.mobilePhone?"/":""," ",a.mobilePhone),r(2),Bt("",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 la=n=>({"bg-gradient-warning":n});function sa(n,l){if(n&1&&(i(0,"small",5),o(1),g(2,"date"),g(3,"date"),t()),n&2){let e=m();r(),S("(",I(2,1,e.lastMonthDate,"dd MMM yyyy")+" - "+I(3,4,e.currentDate,"dd MMM yyyy"),")")}}function ca(n,l){if(n&1){let e=v();i(0,"button",13),b("click",function(){_(e);let s=m();return C(s.loadOutlet())}),o(1,"Load"),t()}}function ma(n,l){if(n&1){let e=v();i(0,"button",13),b("click",function(){_(e);let s=m();return C(s.loadMinMax())}),o(1,"Load Min Max Date"),t()}}function da(n,l){n&1&&(i(0,"th",11),o(1,"Min Date"),t())}function pa(n,l){n&1&&(i(0,"th",11),o(1,"Max Date"),t())}function ua(n,l){if(n&1&&(i(0,"td",14),o(1),g(2,"date"),t()),n&2){let e=m().$implicit;r(),x(I(2,1,e.MinDate,"dd MMM yyyy"))}}function fa(n,l){if(n&1&&(i(0,"td",14),o(1),g(2,"date"),t()),n&2){let e=m().$implicit;r(),x(I(2,1,e.MaxDate,"dd MMM yyyy"))}}function _a(n,l){if(n&1&&(i(0,"tr",12)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",14),o(6),g(7,"number"),t(),i(8,"td",14),o(9),g(10,"number"),t(),u(11,ua,3,4,"td",14),u(12,fa,3,4,"td",14),t()),n&2){let e=l.$implicit,a=l.$index,s=m();r(2),x(a+1),r(2),S(" ",e.Name," "),r(),_e(A(12,la,(e==null?null:e.OrdersCount)<25||e.OrdersCount==null)),r(),S(" ",y(7,8,e.OrdersCount??0)),r(3),x(y(10,10,e.RegisterCount??1)),r(2),f(s.isLoadMinMaxDate?11:-1),r(),f(s.isLoadMinMaxDate?12:-1)}}var Ft=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)(p(we),p(E))};static \u0275cmp=M({type:n,selectors:[["POS-outlet-card"]],inputs:{lastMonthDate:"lastMonthDate",currentDate:"currentDate",outlets:"outlets",showLoadButton:"showLoadButton"},standalone:!1,decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-os-center","justify-content-between"],[1,"d-flex","align-items-center"],[1,"fa","fa-location-dot","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-secondary"],[1,"card-body","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],[1,"text-end",2,"width","120px"],[1,"border"],[1,"btn","btn-sm","btn-outline-secondary",3,"click"],[1,"text-end"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),h(3,"i",3),i(4,"div")(5,"h3",4),o(6,"Outlets Usage"),t(),u(7,sa,4,7,"small",5),t()(),u(8,ca,2,0,"button",6),u(9,ma,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(),u(22,da,2,0,"th",11),u(23,pa,2,0,"th",11),t()(),i(24,"tbody"),W(25,_a,13,14,"tr",12,H),g(27,"sortBy"),t()()()()),e&2&&(r(7),f(a.outlets!=null&&a.outlets.length?7:-1),r(),f(a.showLoadButton?8:-1),r(),f(!a.showLoadButton&&!a.isLoadMinMaxDate?9:-1),r(13),f(a.isLoadMinMaxDate?22:-1),r(),f(a.isLoadMinMaxDate?23:-1),r(2),U(Pe(27,5,a.outlets,"desc","OrdersCount")))},dependencies:[Ce,Z,pt],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 ga(n,l){if(n&1){let e=v();i(0,"input",11),D("ngModelChange",function(s){_(e);let c=m();return T(c.nameForm,s)||(c.nameForm=s),C(s)}),t()}if(n&2){let e=m();w("ngModel",e.nameForm)}}function ba(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=m();r(),x(e.name??"-")}}function ha(n,l){if(n&1){let e=v();i(0,"input",11),D("ngModelChange",function(s){_(e);let c=m();return T(c.npwpForm,s)||(c.npwpForm=s),C(s)}),t()}if(n&2){let e=m();w("ngModel",e.npwpForm)}}function xa(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=m();r(),x(e.npwp??"-")}}function Sa(n,l){if(n&1){let e=v();i(0,"textarea",12),D("ngModelChange",function(s){_(e);let c=m();return T(c.addressForm,s)||(c.addressForm=s),C(s)}),t()}if(n&2){let e=m();w("ngModel",e.addressForm)}}function va(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=m();r(),S(" ",e.taxAddress??"-"," ")}}function ya(n,l){if(n&1&&(i(0,"div",9)(1,"h4",6),o(2,"Document Link"),t(),i(3,"h4",8)(4,"a",13),o(5,"view"),t()()()),n&2){let e=m();r(4),d("href",e.documentLink,he)}}function Ma(n,l){if(n&1&&(i(0,"div",9)(1,"h4",6),o(2,"WHT"),t(),i(3,"h4",8),o(4),t()()),n&2){let e=m();r(4),S(" ",e.whtPercentage??"-","% ")}}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)(p(E))};static \u0275cmp=M({type:n,selectors:[["POS-tax-card"]],inputs:{outletCount:"outletCount",name:"name",npwp:"npwp",documentLink:"documentLink",whtPercentage:"whtPercentage",frequency:"frequency",taxAddress:"taxAddress"},standalone:!1,decls:27,vars:6,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"btn","btn-sm","btn-outline-primary","btn-upgrade",3,"click"],[1,"card-body"],[1,"d-flex","justify-content-between"],[1,"fw-normal","title-form"],["type","text",1,"form-control",2,"width","250px",3,"ngModel"],[1,"text-secondary","fw-normal","user-info"],[1,"d-flex","justify-content-between","mt-8"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModel"],["type","text",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["target","_blank",3,"href"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Tax Information"),t(),i(5,"small",2),o(6,"PPN 11% + Tax Invoice"),t()(),i(7,"button",3),b("click",function(){return a.editData()}),o(8),t()(),i(9,"div",4)(10,"div",5)(11,"h4",6),o(12,"Full Name"),t(),u(13,ga,1,1,"input",7)(14,ba,2,1,"h4",8),t(),i(15,"div",9)(16,"h4",6),o(17,"NPWP"),t(),u(18,ha,1,1,"input",7)(19,xa,2,1,"h4",8),t(),i(20,"div",9)(21,"h4",6),o(22,"Tax Address"),t(),u(23,Sa,1,1,"textarea",10)(24,va,2,1,"h4",8),t(),u(25,ya,6,1,"div",9),u(26,Ma,5,1,"div",9),t()()),e&2&&(r(8),S(" ",a.isEdit?"Save":"Edit"," "),r(5),f(a.isEdit?13:14),r(5),f(a.isEdit?18:19),r(5),f(a.isEdit?23:24),r(2),f(a.documentLink?25:-1),r(),f(a.whtPercentage?26:-1))},dependencies:[G,N,B],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 Ta(n,l){if(n&1&&h(0,"POS-tax-card",10),n&2){let e=m();d("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 Da(n,l){if(n&1&&(i(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"section",2)(4,"div",3)(5,"div",4),h(6,"POS-invoices-card",5)(7,"POS-outlet-card",6),g(8,"async"),g(9,"async"),g(10,"async"),g(11,"async"),t(),i(12,"div",7),h(13,"POS-billing-info-card",8)(14,"POS-renewal-card",9),u(15,Ta,1,7,"POS-tax-card",10),t()()()()()()),n&2){let e=l,a=m();d("pageData",a.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(6),d("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(),d("lastMonthDate",y(8,23,a.from$))("currentDate",y(9,25,a.to$))("outlets",y(10,27,a.outlets$))("showLoadButton",y(11,29,a.showLoadButton$)),r(6),d("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(),d("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(),f((e.Subscription==null?null:e.Subscription.Currency)!="USD"?15:-1)}}var Vt=class n{title=Te(li);menuData={H:"My Subscription",N:{SM:[]},T:"My Subscription",U:[]};outlets$;from$;to$;subscriptionData$;lastUnpaidInvoiceDate$;showLoadButton$;constructor(l,e,a,s){let P=this.title.getTitle().split("|")[0]+"| My Subscription";this.title.setTitle(P),this.subscriptionData$=l.subscriptionData$,this.lastUnpaidInvoiceDate$=l.lastUnpaidInvoiceDate$,this.outlets$=a.outlets$,this.showLoadButton$=a.showLoadButton$,this.from$=a.from$,this.to$=a.to$,s.initScript().subscribe()}static \u0275fac=function(e){return new(e||n)(p(se),p(Be),p(we),p(Re))};static \u0275cmp=M({type:n,selectors:[["POS-my-subscription-v2"]],standalone:!1,features:[ei([se,Be,we])],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"subs-container"],[1,"content"],[1,"d-flex","flex-sm-row","flex-column",2,"column-gap","20px"],[1,"left-container"],[3,"invoices","WHTPercentage","VATEnabled","subscriptionStatus","currency"],[3,"lastMonthDate","currentDate","outlets","showLoadButton"],[1,"right-container"],[3,"subscribedSince","outlets","frequency","total"],[3,"updateBillingOnPageLoad","lastUnpaidInvoiceDate","email","phone","mobilePhone","recurringStatus"],[3,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress"]],template:function(e,a){if(e&1&&(u(0,Da,16,31,"mainpanel-cmp",0),g(1,"async")),e&2){let s;f((s=y(1,1,a.subscriptionData$))?0:-1,s)}},dependencies:[te,Et,Pt,kt,Ft,Nt,ai],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 Ea(n,l){if(n&1){let e=v();i(0,"div",14),b("click",function(){_(e);let s=m().$index,c=m(2);return C(c.readMore(s))}),o(1,"read more..."),t()}}function Pa(n,l){if(n&1&&(i(0,"tr",10)(1,"td")(2,"b"),o(3),t(),h(4,"div",12),u(5,Ea,2,0,"div",13),t(),i(6,"td"),o(7),g(8,"date"),t(),i(9,"td"),o(10),t()()),n&2){let e=l.$implicit;r(3),x(e.Header),r(),d("innerHTML",e.displayedMessage,q),r(),f(e.showReadMore?5:-1),r(2),x(I(8,5,e.Created,"dd MMM yyyy HH:mm")),r(3),x(e.IsFinished?"Finished":"In Progress")}}function Ia(n,l){if(n&1){let e=v();i(0,"mat-paginator",15),b("page",function(s){_(e);let c=m(2);return C(c.onPaginationChange(s))}),t()}if(n&2){let e=m(2);d("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Oa(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1),b("onSubmit",function(){_(e);let s=m();return C(s.searchFromPageOne())}),i(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),o(6,"From"),t(),i(7,"datepicker",4),D("dateChange",function(s){_(e);let c=m();return T(c.pageData.Filter.From,s)||(c.pageData.Filter.From=s),C(s)}),t()(),i(8,"div")(9,"h6"),o(10,"To"),t(),i(11,"datepicker",5),D("dateChange",function(s){_(e);let c=m();return T(c.pageData.Filter.To,s)||(c.pageData.Filter.To=s),C(s)}),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"),W(24,Pa,11,8,"tr",10,H),t()(),i(26,"div"),u(27,Ia,1,3,"mat-paginator",11),t()()()()}if(n&2){let e=m();d("pageData",e.menuData)("hideSearchBox",!0),r(7),w("date",e.pageData.Filter.From),r(4),w("date",e.pageData.Filter.To),r(13),U(e.data.Data),r(3),f(e.pagination.listTotal>0?27:-1)}}var At=class n extends Fe{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)(p(le),p(E))};static \u0275cmp=M({type:n,selectors:[["POS-async-notification"]],standalone:!1,features:[re],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],[1,"d-flex"],["container",""],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],[2,"word-break","break-all",3,"innerHTML"],[1,"text-primary","pointer"],[1,"text-primary","pointer",3,"click"],[3,"page","length","pageSize","pageIndex"]],template:function(e,a){e&1&&u(0,Oa,28,5,"mainpanel-cmp",0),e&2&&f(a.data?0:-1)},dependencies:[te,ct,Ne,Z],encapsulation:2})};var ka=[{path:"Main/My_Profile",component:Ct},{path:"Main/My_Subscription",component:Vt},{path:"Main/My_Subscription/V2",component:yt},{path:"Notification/Push",component:wt},{path:"Notification/Async",component:At},{path:"Main/My_Sales",component:bt},{path:"Main/My_Subscription/Choose_your_plan",component:xt}],Rt=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Ke({type:n});static \u0275inj=Qe({imports:[Lt.forChild(ka),Lt]})};var zi=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Ke({type:n});static \u0275inj=Qe({providers:[Z],imports:[ri,rt,ui,Rt,Di,Mi,mt,gi,Pi,_i,Ni,ye,Fi,Ti,fi,Li,Ri,Hi,Oi]})};export{zi as ProfileModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
1
|
+
import{a as g}from"./chunk-XCSDEGWL.js";import{Ca as l,Rc as h,e as c}from"./chunk-L3U6V3BF.js";var p=class extends g{constructor(t,e,s,i,n,a,o,r){super(t,e,s,i,n,a,o);this.httpService=e;this.toastrService=n;this.route=a;this.cdr=r;r&&h(()=>{this.infiniteListSignal(),this.cdr.markForCheck()})}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal=0;_infiniteList$=new c([]);infiniteListSignal=l([]);get infiniteList(){return this._infiniteList$.value}set infiniteList(t){this._infiniteList$.next(t),this.infiniteListSignal.set(t)}originalData=[];StoreRowsCountAPIResult(t,e=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(s=>{this.listTotal=s.Count,this.pageData.HideStoreApiCount=!0,e&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData()),this.cdr&&this.cdr.markForCheck()})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let e=Array.isArray(t.Data?.hits),s=Array.isArray(t.Data?.[0]?.Variants),i=[...this.infiniteList];if(this.extendData){let a=i.at(-1),o=t.Data.find(r=>r.ID===a?.ID);if(s&&a)if(o){let r=t.Data.filter(u=>u.ID!==a?.ID);a.Variants=a.Variants.concat(o.Variants||[]),i=i.concat(r)}else i=i.concat(t.Data);else i=i.concat(e?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else i=e?t.Data.hits:t.Data,this.assignAggregate(t);this.infiniteList=i,this.originalData=[...i];let n=e?t.Data.hits.length:t.Data.length;this.nextPageDisabled=n<this.pageData.Filter.RowCount,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t),this.cdr?.markForCheck?.()}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{p as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Vt,b as Ot}from"./chunk-TRK4LJDS.js";import{b as It}from"./chunk-B4TZQBTN.js";import{a as St,b as wt,c as Et,d as kt,e as Dt}from"./chunk-OB6KFXD6.js";import{a as Ct}from"./chunk-ZOYWCF3Q.js";import{a as we,b as Qe}from"./chunk-GXAF3JUO.js";import{a as Nt}from"./chunk-LB5UXGDG.js";import{a as Mt}from"./chunk-YDL2MTWE.js";import{c as xt}from"./chunk-
|
|
1
|
+
import{a as Vt,b as Ot}from"./chunk-TRK4LJDS.js";import{b as It}from"./chunk-B4TZQBTN.js";import{a as St,b as wt,c as Et,d as kt,e as Dt}from"./chunk-OB6KFXD6.js";import{a as Ct}from"./chunk-ZOYWCF3Q.js";import{a as we,b as Qe}from"./chunk-GXAF3JUO.js";import{a as Nt}from"./chunk-LB5UXGDG.js";import{a as Mt}from"./chunk-YDL2MTWE.js";import{c as xt}from"./chunk-RWW55Z7V.js";import{b as Tt,c as vt}from"./chunk-V6D6TV7B.js";import{a as ot}from"./chunk-UIVJ2JQT.js";import{a as Ie,b as mt,c as yt,d as bt}from"./chunk-4HLKKTIV.js";import{b as ut,c as pe,d as ze,j as ht,k as O,l as _t}from"./chunk-RIZ4YVMH.js";import{A as st,F as ct,H as dt,V as He,W as pt,a as Se,ga as Re,m as lt,oa as ee,pa as P,qa as gt,ra as ft,v as Pe,w as at,x as Z,xa as Ne,z as de}from"./chunk-Z76C52NM.js";import{F as ce,a as rt,h as ve,o as xe}from"./chunk-7MRUPBXU.js";import{a as Te}from"./chunk-WUV22SZ4.js";import{s as Ce}from"./chunk-TANYEHMZ.js";import{$b as h,Ab as Q,Ac as A,Bc as $,Ca as me,Cb as U,Cc as Xe,Hb as a,Hc as Ze,Ia as G,Ib as m,Ic as et,Jb as y,Kb as I,Nc as k,Ob as w,Pb as E,Qb as N,Qc as F,Rb as V,Ub as C,Uc as tt,Vc as le,Wb as s,Xa as c,Y as Oe,Ya as x,Zb as v,Zc as Ae,_b as D,ac as _,bd as T,ca as Fe,cd as q,d as $e,eb as ie,ec as Y,fa as qe,fc as Le,ga as Be,hc as J,ib as z,ic as f,id as nt,jb as he,jc as L,ka as ge,kc as ye,kd as ae,la as W,lc as X,ld as se,ma as fe,mb as oe,na as ne,nb as _e,o as Ve,oa as je,ob as d,oc as Ge,od as be,pa as M,pc as Ye,pd as j,qc as Je,qd as it,ta as u,ua as g,va as B,wb as S,xb as Ke,xd as K,yb as We,yc as re}from"./chunk-L3U6V3BF.js";import{a as te}from"./chunk-SNAKHGZS.js";var Ft=`
|
|
2
2
|
.p-tree {
|
|
3
3
|
display: block;
|
|
4
4
|
background: dt('tree.background');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},pos:{indexedDBVersion:3,submitOrderTimeout:2e4,fileSizeLimit:9e5},version:"
|
|
1
|
+
var e={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},pos:{indexedDBVersion:3,submitOrderTimeout:2e4,fileSizeLimit:9e5},version:"25511",outletMaximumSubscription:10,midtransClientKey:"Mid-client-rdi5ridKhHfeIvTj",ngHttpLoaderDebounceDelay:175,news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:web&sort=sortOrder:asc",changelog:[],uppy:{invoicePayment:25e5,receiptTemplate:25e5},intercom:{appId:"xv1oomgl"},whatsappTemplateMessage:`Thank you for shopping at {Brand}
|
|
2
2
|
Here is the receipt for your purchase {Number} - {Currency} {Amount}
|
|
3
3
|
{ReceiptLink}
|
|
4
4
|
Please let us know about your shopping experience using the receipt link.`,FALLBACK_PRODUCT_IMAGE_URL:"https://cdn.dealpos.app/template/products_thumb.png",files:{csv:{sales_person_import:"https://cdn.dealpos.xyz/web-import-template/SalesPerson_DealPOS.csv",supplier_import:"https://cdn.dealpos.xyz/web-import-template/Import_Supplier_DealPOS.csv",customer_import:"https://cdn.dealpos.xyz/web-import-template/Customer_Import_TemplateV2.csv",courier_import:"https://cdn.dealpos.xyz/web-import-template/Courier-Import-Template.csv",customer_invoice_import:"https://cdn.dealpos.xyz/web-import-template/Import-Invoice-Template.csv",estimate_import:"https://cdn.dealpos.xyz/web-import-template/Estimate_DealPOS_New.csv",supplier_bill_import:"https://cdn.dealpos.xyz/web-import-template/SupplierBill_Import_TemplateV2.csv",outlet_import:"https://cdn.dealpos.xyz/web-import-template/Outlet_Import_Template.csv",payment_import:"https://cdn.dealpos.xyz/web-import-template/Import-Payment.csv",product_import:"https://cdn.dealpos.xyz/web-import-template/Product_Import_TemplateV2.csv",pricebook_import:"https://res.cloudinary.com/pos/raw/upload/v1647931293/POS/CSV/Pricebook.csv",promotion_coupon_import:"https://cdn.dealpos.xyz/web-import-template/Promotion-Coupon-Import-TemplateV3.csv",adjustment_item_import:"https://cdn.dealpos.xyz/web-import-template/ImportItem_Adjustment_TemplateV2.csv",transfer_order_import:"https://res.cloudinary.com/pos/raw/upload/v1699867624/POS/CSV/ImportTransferOrder_DealPOS_New.csv",buy_import:"https://cdn.dealpos.xyz/web-import-template/ImportBuyV2_DealPOS_New.csv",sell_import:"https://res.cloudinary.com/pos/raw/upload/v1699867624/POS/CSV/ImportSell_DealPOS_New.csv",promotion_event_import:"https://cdn.dealpos.xyz/web-import-template/PromotionEvent_Import_TemplateV2.csv",promotion_event_item_requirement_import:"https://cdn.dealpos.xyz/web-import-template/PromotionEvent_ItemRequirement_Import_TemplateV2.csv",promotion_coupon_item_requirement_import:"https://cdn.dealpos.xyz/web-import-template/PromotionCoupon_ItemRequirement_Import_TemplateV2.csv"}}};export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V,b as W}from"./chunk-KFOEUAQT.js";import{a as B}from"./chunk-
|
|
1
|
+
import{a as V,b as W}from"./chunk-KFOEUAQT.js";import{a as B}from"./chunk-CAGFIP4G.js";import{e as J,f as q}from"./chunk-MZDVGN2B.js";import"./chunk-RWW55Z7V.js";import{b as I}from"./chunk-XPM7J5AN.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import{b as E,c as P}from"./chunk-V6D6TV7B.js";import"./chunk-QWLNF7VL.js";import"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import{s as T}from"./chunk-TANYEHMZ.js";import{Ab as h,Cb as S,Hb as r,Hc as d,Ib as o,Ic as D,Jb as t,Jc as C,Kb as c,Pd as M,Rb as j,Ub as v,Wb as b,Xa as l,eb as m,ib as f,jc as a,kc as L,lc as x,mb as y,sd as _,ta as u,td as k,ua as g,ud as w,xd as R}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function A(p,i){if(p&1){let e=j();o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"div",5)(7,"h3"),a(8,"General"),t()(),o(9,"div",6)(10,"div",2)(11,"div",7),c(12,"floatinglabel",8),d(13,"date"),t(),o(14,"div",7),c(15,"floatinglabel",9),d(16,"number"),t()(),o(17,"div",2)(18,"div",7),c(19,"floatinglabel",10),t()()()()()(),o(20,"div",2)(21,"div",7)(22,"div",4)(23,"div",11)(24,"div",12)(25,"h3"),a(26,"Request"),t()(),o(27,"div",13)(28,"button",14),v("click",function(){u(e);let n=b();return g(n.copyClipboard(n.jobLogsDetail==null?null:n.jobLogsDetail.log.req,"Request"))}),a(29,"Copy Request to Clipboard"),t()()(),o(30,"div",6)(31,"pre",15),a(32),d(33,"json"),t()()()(),o(34,"div",7)(35,"div",4)(36,"div",11)(37,"div",12)(38,"h3"),a(39,"Response"),t()(),o(40,"div",13)(41,"button",16),v("click",function(){u(e);let n=b();return g(n.copyClipboard(n.jobLogsDetail==null||n.jobLogsDetail.log==null?null:n.jobLogsDetail.log.res,"Response"))}),a(42,"Copy Response to Clipboard"),t()()(),o(43,"div",6)(44,"pre",17),a(45),d(46,"json"),t()()()()()()()()}if(p&2){let e=b();r("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(12),r("model",C(13,10,e.jobLogsDetail["@timestamp_received"],"dd MMM yyyy")),l(3),r("model",C(16,13,e.jobLogsDetail==null?null:e.jobLogsDetail.DurationInSecond,"1.1-1")+" s"),l(4),r("model",e.jobLogsDetail==null||e.jobLogsDetail.log==null?null:e.jobLogsDetail.log.respCode),l(9),r("matTooltip",e.copyStatus?e.msgCopyClipboard:"Copy to clipboard"),l(4),L(D(33,16,e.jobLogsDetail==null||e.jobLogsDetail.log==null?null:e.jobLogsDetail.log.req)),l(9),r("matTooltip",e.copyStatus?e.msgCopyClipboard:"Copy to clipboard"),l(4),x('"',D(46,18,e.jobLogsDetail==null?null:e.jobLogsDetail.log.res),'"')}}var F=class p extends B{jobLogsDetail;copyStatus;msgCopyClipboard;constructor(i,e,s){super(i,e,"Developer/DeveloperSpace/Webhook/JobLogDetail",s)}postBindForm(i){this.jobLogsDetail=i?.hits[0]?._source,this.jobLogsDetail&&(this.jobLogsDetail.DurationInSecond=parseInt(this.jobLogsDetail?.Duration)/1e3)}copyClipboard(i,e){this.copyStatus=!0,this.msgCopyClipboard=e+" has been coppied to clipboard!",navigator.clipboard.writeText(JSON.stringify(i)),setTimeout(()=>{this.copyStatus=!1},3e3)}static \u0275fac=function(e){return new(e||p)(m(I),m(T),m(M))};static \u0275cmp=f({type:p,selectors:[["app-webhook-job-logs-detail"]],features:[y],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],["id","webhook-logs",1,"container-fluid","pt-5"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-6"],["label","Created",3,"model"],["label","Duration",3,"model"],["label","Response Code",3,"model"],[1,"card-header","d-lg-flex"],[1,"me-auto","mt-5"],[1,"d-sm-block","mt-2"],["id","btnCopyRequest","matTooltipPosition","above",1,"btn","btn-secondary","btn-sm",3,"click","matTooltip"],["id","requestValue",2,"font-size","13px"],["id","btnCopyResponse","matTooltipPosition","above",1,"btn","btn-secondary","btn-sm",3,"click","matTooltip"],["id","responseValue",2,"font-size","13px"]],template:function(e,s){e&1&&h(0,A,47,20,"mainpanel-cmp",0),e&2&&S(s.jobLogsDetail?0:-1)},dependencies:[R,q,J,W,V,P,E,k,w,_],encapsulation:2})};export{F as WebhookJobLogsDetailComponent};
|