dealpos 25.42.0 → 25.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-ROQHG6JX.js → chunk-2CU7XQYN.js} +1 -1
- package/browser/{chunk-YIKW3UR6.js → chunk-2L54CRB2.js} +1 -1
- package/browser/{chunk-HTVJTXND.js → chunk-2O3TR26P.js} +8 -8
- package/browser/{chunk-ZTHPT62A.js → chunk-3A4C23H5.js} +1 -1
- package/browser/{chunk-F4L5OA5I.js → chunk-3JVX2T6M.js} +1 -1
- package/browser/{chunk-GHA3WIJU.js → chunk-3RWVYWJF.js} +1 -1
- package/browser/{chunk-ZXXXSUM7.js → chunk-47W54HJY.js} +1 -1
- package/browser/{chunk-SXFCBAG6.js → chunk-4ODUHZAT.js} +1 -1
- package/browser/{chunk-NJS6IQX6.js → chunk-4R4W625N.js} +1 -1
- package/browser/{chunk-UDRNMFT2.js → chunk-4WW3BBDP.js} +1 -1
- package/browser/{chunk-UIWSGP55.js → chunk-4WYJGX5K.js} +1 -1
- package/browser/{chunk-7OYSGU2F.js → chunk-4XWCWJZC.js} +1 -1
- package/browser/{chunk-M34MZTRY.js → chunk-53ACYG5V.js} +1 -1
- package/browser/{chunk-UU55EO4X.js → chunk-5BZEOCFN.js} +1 -1
- package/browser/{chunk-46DETXA6.js → chunk-5OS5VELO.js} +1 -1
- package/browser/{chunk-5MPRE3II.js → chunk-6A45AGTK.js} +1 -1
- package/browser/{chunk-DLONNLPI.js → chunk-6CQ6XYJG.js} +1 -1
- package/browser/{chunk-IC3DZAMU.js → chunk-6G37ZXRX.js} +1 -1
- package/browser/{chunk-4N6FRENU.js → chunk-6IQQC2YT.js} +1 -1
- package/browser/{chunk-OOXHLUNH.js → chunk-7275MAOI.js} +1 -1
- package/browser/{chunk-TLXGEI76.js → chunk-772SQL5I.js} +1 -1
- package/browser/chunk-7MYFXXHY.js +1 -0
- package/browser/{chunk-EDCFG3LH.js → chunk-7R3X2A2H.js} +1 -1
- package/browser/{chunk-DBZKSONS.js → chunk-7X35YY3T.js} +1 -1
- package/browser/{chunk-DDZ3I4LH.js → chunk-A3CWPPXF.js} +1 -1
- package/browser/{chunk-N6QITTR2.js → chunk-A7PNRSF2.js} +1 -1
- package/browser/{chunk-4HEESH5A.js → chunk-AEHOTFB4.js} +1 -1
- package/browser/{chunk-RDXTLLRW.js → chunk-AQC5G2DR.js} +1 -1
- package/browser/{chunk-5SOJKVR7.js → chunk-BVVYVR6R.js} +1 -1
- package/browser/{chunk-YPFMEFOD.js → chunk-BXAYNP7A.js} +1 -1
- package/browser/{chunk-DHH4PIYF.js → chunk-C32V5IHL.js} +1 -1
- package/browser/{chunk-EFDAS2KA.js → chunk-CD3BSGAP.js} +1 -1
- package/browser/{chunk-6RA3MVUV.js → chunk-CKSMLIVU.js} +2 -2
- package/browser/{chunk-IGHZ4V7Y.js → chunk-CRJOVQ56.js} +2 -2
- package/browser/{chunk-I3N5TRBQ.js → chunk-D5QLS4SZ.js} +1 -1
- package/browser/{chunk-SIRUW7U2.js → chunk-DKPNAGIM.js} +1 -1
- package/browser/{chunk-ED6FLVEK.js → chunk-DNBZTRXL.js} +1 -1
- package/browser/{chunk-HG3CFH36.js → chunk-DNSE6AZ3.js} +1 -1
- package/browser/{chunk-2QVRE7LQ.js → chunk-DV4MQXAE.js} +1 -1
- package/browser/{chunk-I3ZGST4N.js → chunk-EENVAF36.js} +1 -1
- package/browser/{chunk-RFT3FEVW.js → chunk-EHV62EGB.js} +3 -3
- package/browser/{chunk-BM2UYASI.js → chunk-EJFVZSWQ.js} +1 -1
- package/browser/{chunk-T26KVRGE.js → chunk-EMP32K7Q.js} +1 -1
- package/browser/{chunk-55KT4HTM.js → chunk-EOY5VQKV.js} +2 -2
- package/browser/chunk-ERTAWD4X.js +1 -0
- package/browser/{chunk-N23TC7B4.js → chunk-FAJUK2PL.js} +1 -1
- package/browser/{chunk-KWD4ATP5.js → chunk-FKYUI33J.js} +1 -1
- package/browser/{chunk-QDFPKARQ.js → chunk-FNUNWZ2W.js} +1 -1
- package/browser/{chunk-HDBFIDGA.js → chunk-G5P4GFMX.js} +1 -1
- package/browser/{chunk-QYWAJKFK.js → chunk-GGPT7WIY.js} +1 -1
- package/browser/{chunk-LO3FAFDO.js → chunk-GINOZV6C.js} +1 -1
- package/browser/{chunk-E2BNDPLE.js → chunk-GKKKOTYZ.js} +1 -1
- package/browser/{chunk-2H4V4O4E.js → chunk-GOZYJRWV.js} +1 -1
- package/browser/{chunk-7BNQDGUO.js → chunk-GPP3J3W4.js} +1 -1
- package/browser/{chunk-EAFPSXNJ.js → chunk-H66NFIQQ.js} +1 -1
- package/browser/{chunk-UMT5IJRJ.js → chunk-H6LHYTUN.js} +1 -1
- package/browser/{chunk-PKRNU4IK.js → chunk-HA6VJJLI.js} +1 -1
- package/browser/{chunk-WPFMJVWU.js → chunk-HAGFCQCM.js} +1 -1
- package/browser/{chunk-LFGQMERN.js → chunk-HGADEAZ4.js} +1 -1
- package/browser/{chunk-CS3PYDFF.js → chunk-HGM42PVN.js} +1 -1
- package/browser/{chunk-EGIDHMPA.js → chunk-HQQWO76P.js} +1 -1
- package/browser/{chunk-6AMPRFEN.js → chunk-HYZX6TUF.js} +1 -1
- package/browser/chunk-I6NIUHOQ.js +1 -0
- package/browser/{chunk-5BE43QU3.js → chunk-IJ3Y6CA4.js} +1 -1
- package/browser/{chunk-N47VNTBG.js → chunk-IQ26VFNR.js} +1 -1
- package/browser/{chunk-N5UW2RHA.js → chunk-IQ4IMICT.js} +1 -1
- package/browser/{chunk-5DSWFJVI.js → chunk-IRIE5DZT.js} +1 -1
- package/browser/{chunk-FLCAZ4FS.js → chunk-ITLMINSX.js} +1 -1
- package/browser/{chunk-VRQTOJAL.js → chunk-IU526HWZ.js} +1 -1
- package/browser/chunk-JU5FQANB.js +1 -0
- package/browser/{chunk-TBHZV7EF.js → chunk-JYNN4IZB.js} +1 -1
- package/browser/{chunk-BSVPJNZE.js → chunk-K7ON3WKW.js} +1 -1
- package/browser/{chunk-MH6ADXRE.js → chunk-KBO5VO7S.js} +1 -1
- package/browser/{chunk-ZACGGWOQ.js → chunk-LQ3Q52LD.js} +1 -1
- package/browser/{chunk-5AVAHDHN.js → chunk-LWDGMGFV.js} +1 -1
- package/browser/chunk-MW6BE5UI.js +1 -0
- package/browser/chunk-NII66FBK.js +3 -0
- package/browser/chunk-NM2P4KR5.js +1 -0
- package/browser/{chunk-MUWBVOJI.js → chunk-NOQM2VPB.js} +1 -1
- package/browser/{chunk-AZO64X7U.js → chunk-NXXNEU5Q.js} +1 -1
- package/browser/{chunk-6IF4NVBV.js → chunk-O3NKN7KT.js} +1 -1
- package/browser/{chunk-VX6ZWRY5.js → chunk-OAY4ZDTS.js} +1 -1
- package/browser/{chunk-YWGXM2C3.js → chunk-OG45AMIC.js} +1 -1
- package/browser/{chunk-HTU7TNUP.js → chunk-OSSHGIDA.js} +1 -1
- package/browser/{chunk-CQZUC4YF.js → chunk-P6LA3P5N.js} +1 -1
- package/browser/{chunk-XEQB57SN.js → chunk-PDKNFOY7.js} +1 -1
- package/browser/chunk-PNQGP25W.js +1 -0
- package/browser/{chunk-U4U76CXH.js → chunk-PRBPKAI4.js} +1 -1
- package/browser/{chunk-LJXYWJZW.js → chunk-PZANARAM.js} +1 -1
- package/browser/{chunk-ZVEJWL4V.js → chunk-Q5IKPX3P.js} +1 -1
- package/browser/{chunk-5C4DEWEB.js → chunk-Q7GDNJAI.js} +3 -3
- package/browser/{chunk-ZHQEEPCW.js → chunk-QCEQZT7E.js} +1 -1
- package/browser/{chunk-WM2AITL6.js → chunk-QCXWKQ7Z.js} +1 -1
- package/browser/{chunk-NIZYEBIJ.js → chunk-QFO3KUMD.js} +1 -1
- package/browser/{chunk-YPOODN5H.js → chunk-QJ4LGJCR.js} +1 -1
- package/browser/{chunk-CICNZFRR.js → chunk-QPXWIIQK.js} +1 -1
- package/browser/{chunk-DSXPDWMW.js → chunk-R7Y776E5.js} +1 -1
- package/browser/{chunk-W4UISTRM.js → chunk-SEXQYEXV.js} +1 -1
- package/browser/{chunk-Z56AQWHN.js → chunk-SHMXCJ6Q.js} +1 -1
- package/browser/{chunk-W5GCPYXR.js → chunk-SHPUXNKO.js} +1 -1
- package/browser/{chunk-YTN2MAGY.js → chunk-SIH5NVFR.js} +1 -1
- package/browser/{chunk-TLWPWXDM.js → chunk-SV4HJFAL.js} +1 -1
- package/browser/{chunk-RETQC5XM.js → chunk-T5HYNGEA.js} +1 -1
- package/browser/{chunk-CUNZPCNX.js → chunk-TDO7VOF5.js} +1 -1
- package/browser/{chunk-XYZNPGYI.js → chunk-THXV6YJP.js} +1 -1
- package/browser/{chunk-C3DQRSEL.js → chunk-TIX624OU.js} +1 -1
- package/browser/{chunk-T2IJ4MCB.js → chunk-TQZQYUFG.js} +1 -1
- package/browser/{chunk-4I4MCBI3.js → chunk-TRUZ46QL.js} +1 -1
- package/browser/{chunk-NDANDUNF.js → chunk-TSBV5MA4.js} +1 -1
- package/browser/{chunk-KFFIMVTO.js → chunk-TU4O5BX3.js} +1 -1
- package/browser/{chunk-H3ARLDNZ.js → chunk-TUQ4INQ4.js} +1 -1
- package/browser/{chunk-JUT3PXG2.js → chunk-TZ74SUXJ.js} +1 -1
- package/browser/{chunk-MRF4FND7.js → chunk-UE53BLCC.js} +1 -1
- package/browser/{chunk-ZJ23VRN3.js → chunk-UEQT5HE5.js} +1 -1
- package/browser/{chunk-5NDP4IKK.js → chunk-UQP7S73H.js} +1 -1
- package/browser/{chunk-TGGLJVDI.js → chunk-V52QD5BS.js} +1 -1
- package/browser/{chunk-FTK6YP6X.js → chunk-VD4QQDNI.js} +1 -1
- package/browser/{chunk-JDOZFN63.js → chunk-VGNMBCUC.js} +1 -1
- package/browser/{chunk-KKWXZLT5.js → chunk-VKJIDCM7.js} +1 -1
- package/browser/{chunk-TVEGYRXE.js → chunk-VSF6PYZW.js} +1 -1
- package/browser/{chunk-QGDUBOY6.js → chunk-W7R2NCKA.js} +2 -2
- package/browser/{chunk-G75TUOW6.js → chunk-W7Z44R3C.js} +1 -1
- package/browser/{chunk-YXEHR27Y.js → chunk-XBMOSDDE.js} +1 -1
- package/browser/{chunk-UHAOZI7V.js → chunk-XGGQUHUR.js} +1 -1
- package/browser/{chunk-AF2E7NTE.js → chunk-XPEGAYJO.js} +1 -1
- package/browser/{chunk-PGWC5FQQ.js → chunk-Y6VMIGXC.js} +1 -1
- package/browser/{chunk-IWZCWLYG.js → chunk-Z5HBVHYO.js} +1 -1
- package/browser/{chunk-3GRGFP66.js → chunk-ZFXZABWG.js} +14 -14
- package/browser/{chunk-YN74XRON.js → chunk-ZH7IWOYT.js} +1 -1
- package/browser/{chunk-5UGZ6SP2.js → chunk-ZHIGBBGN.js} +2 -2
- package/browser/chunk-ZOIQWHQE.js +1 -0
- package/browser/{chunk-SZPU2EUQ.js → chunk-ZSE5MOHQ.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-EFBZ6Z35.js → main-C7YDPF2T.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-5G267UZX.js +0 -1
- package/browser/chunk-CKXIMJSM.js +0 -1
- package/browser/chunk-E4EPR65A.js +0 -1
- package/browser/chunk-J4ZUV7IH.js +0 -3
- package/browser/chunk-PIPVFOET.js +0 -1
- package/browser/chunk-STIS4QW6.js +0 -1
- package/browser/chunk-XSM7RMIF.js +0 -1
- package/browser/chunk-YTK6Z533.js +0 -1
- package/browser/chunk-ZRCTLVL4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-Z5HBVHYO.js";import{C as N,F as L,G as j,c as E,h as A,i as V,k as I,o as R,p as U}from"./chunk-RVXZOIFQ.js";import{c as D}from"./chunk-TDO7VOF5.js";import"./chunk-NOQM2VPB.js";import{a as p}from"./chunk-ZZGSAFGO.js";import"./chunk-PZANARAM.js";import{$a as b,$b as x,Ib as i,Jb as n,Kb as u,Ob as C,Qb as g,Qd as M,Vd as P,Zb as S,_b as _,d as f,da as v,db as d,ec as s,jc as w,kb as y,kc as O,lc as T,va as l,wa as m}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";var z=["totpCode"],F=class h{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){p.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),p.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return p.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return p.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||h)(d(k),d(M),d(D),d(P))};static \u0275cmp=y({type:h,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&S(z,5),t&2){let r;_(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","//res.cloudinary.com/pos/image/upload/v1666079494/POS/Images/Login/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=C();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),g("submit",function(){return l(r),m(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),m(a)}),g("keypress",function(a){return l(r),m(o.numberOnly(a))})("ngModelChange",function(a){return l(r),m(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[j,U,E,A,V,N,L,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{F as AuthTotpComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as te}from"./chunk-XZR3IMWZ.js";import{e as U,f as re}from"./chunk-NDANDUNF.js";import"./chunk-JDOZFN63.js";import{a as Q,b as H}from"./chunk-2QVRE7LQ.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import{D as A}from"./chunk-EFDAS2KA.js";import"./chunk-JOXTERIM.js";import{F as ie,N as ne}from"./chunk-46DETXA6.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import"./chunk-RVXZOIFQ.js";import"./chunk-CUNZPCNX.js";import"./chunk-MUWBVOJI.js";import{d as ee}from"./chunk-ZZGSAFGO.js";import"./chunk-LJXYWJZW.js";import{$a as o,Ac as C,Bc as b,Cc as X,Fc as P,Ib as n,Jb as i,Kb as h,Lb as I,Mb as D,Ob as O,Qb as y,Rb as m,Td as q,Vd as Z,Yc as k,Yd as R,Zc as L,d as w,da as u,db as x,dc as T,ec as r,ed as j,fc as v,gc as f,gd as B,hc as K,jd as Y,ka as M,kb as $,lb as N,ob as V,qb as d,va as g,vb as c,wa as S,zc as _}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";function ue(t,a){if(t&1){let e=O();n(0,"a",19),y("click",function(){g(e);let l=m();return S(l.convertToCsv())}),h(1,"i",20),r(2," Export Fail"),i()}}function xe(t,a){if(t&1){let e=O();n(0,"a",21),y("click",function(){g(e);let l=m();return S(l.uploadOrders())}),h(1,"i",22),r(2," Send Transaction"),i()}}function ve(t,a){t&1&&(n(0,"th",23)(1,"i"),r(2,"Actions"),i()())}function ge(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),v(e==null||e.Variant==null?null:e.Variant.Name)}}function Se(t,a){if(t&1&&(n(0,"div",28),d(1,ge,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function he(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e==null?null:e.Quantity," ")}}function Oe(t,a){if(t&1&&(n(0,"div",30),d(1,he,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function ye(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Price)," ")}}function Ce(t,a){if(t&1&&(n(0,"div",30),d(1,ye,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function be(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function Ee(t,a){if(t&1&&(n(0,"div",30),d(1,be,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Ie(t,a){if(t&1){let e=O();n(0,"td",31)(1,"i",32),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeOrder(l))}),i()()}}function De(t,a){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,Se,2,1,"div",25),i(),n(8,"td"),d(9,Oe,2,1,"div",26),i(),n(10,"td"),d(11,Ce,2,1,"div",26),i(),n(12,"td"),d(13,Ee,2,1,"div",26),i(),d(14,Ie,2,0,"td",27),i()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,7,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(),c("ngIf",s.roleService.sell.Delete)}}function Te(t,a){if(t&1&&(I(0),d(1,De,15,10,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.offlineOrders)}}function Pe(t,a){t&1&&(n(0,"td",33)(1,"h4",34),r(2,"There is no Offline Order"),i()())}function Fe(t,a){if(t&1&&(I(0),n(1,"span"),r(2),n(3,"strong"),r(4),i(),n(5,"strong"),r(6),_(7,"number"),i(),n(8,"strong"),r(9),_(10,"number"),i()(),D()),t&2){let e=m().$implicit;o(2),f("",e==null||e.Variant==null?null:e.Variant.Name," "),o(2),f(" ",e.Quantity+" x"," "),o(2),f(" ",C(7,4,e.Price)+" ="," "),o(3),f(" ",C(10,6,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function we(t,a){if(t&1&&(n(0,"div",40),d(1,Fe,11,8,"ng-container",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Me(t,a){if(t&1&&(n(0,"div",41),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e.Message," ")}}function $e(t,a){if(t&1){let e=O();I(0),n(1,"a",42),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeFailedOrder(l))}),h(2,"i",43),i(),D()}}function Ne(t,a){if(t&1){let e=O();n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,we,2,1,"div",35),i(),n(8,"td"),d(9,Me,2,1,"div",36),i(),n(10,"td",37)(11,"a",38),y("click",function(){let l=g(e).$implicit,p=m(2);return S(p.uploadFailedOrder(l))}),h(12,"i",39),i(),d(13,$e,3,0,"ng-container",29),i()()}if(t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,5,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngIf",e.Message),o(4),c("ngIf",s.roleService.sell.Delete)}}function Ve(t,a){if(t&1&&(I(0),d(1,Ne,14,8,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.failedOrders)}}function ke(t,a){t&1&&(n(0,"td",44)(1,"h4",34),r(2,"There is no Failed Order"),i()())}var G=class t extends Q{constructor(e,s,l,p,E,F){super(e);this.httpService=s;this.localData=l;this.csvConverter=p;this.toastr=E;this.roleService=F;this.destroy$=new w,this.pageData={Header:"Offline Orders"}}pageData;offlineOrders=[];failedOrders=[];destroy$;ngOnInit(){this.menuData$.pipe(u(this.destroy$)).subscribe(()=>{this.getOfflineOrders(),this.getFailedOrders()})}removeOrder(e){this.localData.removeOrder(e.id).subscribe({next:()=>{this.toastr.success("Successfully removed order "+e.Order.Number,"Offline Order Deleted!"),this.getOfflineOrders()},error:s=>{this.toastr.warning("Failed to remove order "+e.Order.Number,"Failed to delete order!")}})}getOfflineOrders(){this.localData.findAllOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.offlineOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}getFailedOrders(){this.localData.getFailedOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.failedOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}uploadFailedOrder(e){this.localData.uploadFailedOrder(e).pipe(u(this.destroy$)).subscribe({next:()=>{this.toastr.success("Successfully uploaded order "+e.Order.Number,"Sync Successful!"),this.getFailedOrders()},error:()=>{this.toastr.error("Failed to sync failed order "+e.Order.Number,"Error!")}})}removeFailedOrder(e){this.localData.removeFailedOrder(e.id).pipe(u(this.destroy$)).subscribe({next:s=>{this.toastr.success("Success to remove failed offline order","Error!"),this.getFailedOrders()},error:s=>{this.toastr.error("Failed to remove failed offline order","Error!")}})}uploadOrders(){this.localData.uploadOrders().pipe(u(this.destroy$)).subscribe({next:e=>{e?this.getOfflineOrders():(this.getOfflineOrders(),this.getFailedOrders())},error:e=>{this.getOfflineOrders(),this.getFailedOrders()}})}convertToCsv(){this.csvConverter.convertToCSV(this.getExportData(),"Fail_Transaction.csv")}getExportData(){let e=[["Number","Date","Item","Qty","Price","Total"]];return this.failedOrders.forEach(s=>{s.Items.forEach(l=>{let p=s.Order.Number.toString(),E=s.Order.Date.toLocaleString(),F=l.Quantity.toString(),ae=l.Price.toString(),le=(l.Quantity*l.UnitQuantity*(l.Price*(1-l.Discount/100))-l.DiscountAmount).toString(),se=[p,E,l.Variant.Name,F,ae,le];e.push(se)})}),e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A),x(te),x(Z),x(ee))};static \u0275cmp=$({type:t,selectors:[["pos-orders"]],standalone:!1,features:[V],decls:54,vars:10,consts:[["noOrders",""],["noFailedOrders",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary me-6",3,"click",4,"ngIf"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-10","mb-12"],[1,"col-md"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[1,"border-end",2,"width","130px"],[1,"border-end",2,"width","90px"],[1,"border-end"],[1,"border-end","text-end",2,"width","103px"],[1,"border-end","text-end",2,"width","200px"],["class","text-center","style","width: 90px",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"row","mt-12"],[1,"border-end",2,"width","102px"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-paper-plane"],[1,"text-center",2,"width","90px"],[4,"ngFor","ngForOf"],["class","list-unstyled text-start",4,"ngFor","ngForOf"],["class","list-unstyled text-end",4,"ngFor","ngForOf"],["class","text-center text-danger",4,"ngIf"],[1,"list-unstyled","text-start"],[4,"ngIf"],[1,"list-unstyled","text-end"],[1,"text-center","text-danger"],[1,"fa-solid","fa-xmark","fa-2x","cursor-pointer",3,"click"],["colspan","7"],[1,"text-center","mt-2"],["class","list-inline text-start",4,"ngFor","ngForOf"],["class","text-danger",4,"ngIf"],[1,"d-flex","justify-content-center"],["matTooltipPosition","above","matTooltip","Sync",1,"ms-2","me-2","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-cloud-arrow-up","text-primary","fa-2x"],[1,"list-inline","text-start"],[1,"text-danger"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-regular","fa-xmark-circle","text-primary","fa-2x"],["colSpan","5"]],template:function(s,l){if(s&1&&(n(0,"mainpanel-cmp",2)(1,"actions"),d(2,ue,3,0,"a",3)(3,xe,3,0,"a",4),i(),n(4,"content")(5,"div",5)(6,"div",6)(7,"div",7)(8,"h5"),r(9,"Offline Orders"),i(),n(10,"i"),r(11,"Waiting to be uploaded to the server!"),i(),n(12,"table",8)(13,"thead",9)(14,"tr")(15,"th",10),r(16,"Number"),i(),n(17,"th",11),r(18,"Date"),i(),n(19,"th",12),r(20,"item"),i(),n(21,"th",13),r(22," Qty "),i(),n(23,"th",14),r(24," Price "),i(),n(25,"th",14),r(26," Total "),i(),d(27,ve,3,0,"th",15),i()(),n(28,"tbody"),d(29,Te,2,1,"ng-container",16)(30,Pe,3,0,"ng-template",null,0,P),i()()()(),n(32,"div",17)(33,"div",7)(34,"h5"),r(35,"Synchronization Errors"),i(),n(36,"i"),r(37,"Exception occured when trying to upload these orders"),i(),n(38,"table",8)(39,"thead",9)(40,"tr")(41,"th",11),r(42,"Number"),i(),n(43,"th",11),r(44,"Date"),i(),n(45,"th",12),r(46,"item"),i(),n(47,"th",12),r(48,"Sync exception"),i(),h(49,"th",18),i()(),n(50,"tbody"),d(51,Ve,2,1,"ng-container",16)(52,ke,3,0,"ng-template",null,1,P),i()()()()()()()),s&2){let p=T(31),E=T(53);c("pageData",l.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),o(2),c("ngIf",(l.failedOrders==null?null:l.failedOrders.length)>0),o(),c("ngIf",l.offlineOrders.length>0),o(24),c("ngIf",l.roleService.sell.Delete),o(2),c("ngIf",l.offlineOrders.length>0)("ngIfElse",p),o(22),c("ngIf",l.failedOrders.length>0)("ngIfElse",E)}},dependencies:[k,L,U,B,j],styles:[".cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}"]})};function Le(t,a){if(t&1&&(n(0,"div",5),h(1,"i",6),r(2),_(3,"date"),i()),t&2){let e=m();o(2),f(" ",b(3,1,e.LastSync,"dd MMM yyyy HH:mm:ss")," ")}}function je(t,a){if(t&1&&(n(0,"tr")(1,"td",15),r(2),i(),n(3,"td",16),r(4),i(),n(5,"td"),r(6),i(),n(7,"td",11),r(8),_(9,"number"),i()()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.ID),o(2),v(e.Name),o(2),v(e.Code),o(2),K(" ",s.currency," ",b(9,5,e.UnitPrice,"1.0-4")," ")}}function Be(t,a){if(t&1&&(n(0,"table",7)(1,"thead",8)(2,"tr",9)(3,"th",10),r(4,"ID"),i(),n(5,"th",10),r(6,"Name"),i(),n(7,"th",10),r(8,"Code"),i(),n(9,"th",11),r(10,"Unit Price"),i()()(),n(11,"tbody"),d(12,je,10,8,"tr",12),_(13,"sortBy"),i(),n(14,"tfoot")(15,"tr",13)(16,"td",14)(17,"strong"),r(18),_(19,"number"),i()()()()()),t&2){let e=m();o(12),c("ngForOf",X(13,2,e.variantList,"asc","Name")),o(6),f("",C(19,6,e.variantList.length)," Product ")}}function Re(t,a){t&1&&(n(0,"h3",17),r(1,"Product has not been synced yet!"),i())}var z=class t extends Q{constructor(e,s,l){super(e);this.httpService=s;this._localDataService=l;this.destroy$=new w}variantList=[];OriginalList=[];LastSync;currency;destroy$;ngOnInit(){this.menuData$.subscribe(e=>{this.getVariants(),this.getSyncDate(),this.getCurrency()})}getVariants(){this._localDataService.findAllVariant().pipe(u(this.destroy$)).subscribe({next:e=>{this.OriginalList=e,this.variantList=this.OriginalList},error:e=>{console.error(e)}})}getSyncDate(){this._localDataService.getSyncTime().pipe(u(this.destroy$)).subscribe(e=>{this.LastSync=new Date(e.time)})}getCurrency(){this._localDataService.getPOSStorage().pipe(u(this.destroy$)).subscribe(e=>{e&&(this.currency=e.Currencies[0].Symbol)})}filterList(e){this.variantList=this.OriginalList.filter(s=>s.Name.includes(e))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A))};static \u0275cmp=$({type:t,selectors:[["pos-products"]],standalone:!1,features:[V],decls:8,vars:5,consts:[["noProduct",""],[3,"textChange","pageData","hideSearchDropdown"],["class","h5",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid","class","table",4,"ngIf","ngIfElse"],[1,"h5"],[1,"fa-solid","fa-sync-alt"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-start"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"text-start","empty-column"],[2,"max-width","100px"],[2,"max-width","300px"],[1,"text-center","mt-4"]],template:function(s,l){if(s&1){let p=O();n(0,"mainpanel-cmp",1),y("textChange",function(F){return g(p),S(l.filterList(F))}),n(1,"actions"),d(2,Le,4,4,"div",2),i(),n(3,"content")(4,"div",3),d(5,Be,20,8,"table",4)(6,Re,2,0,"ng-template",null,0,P),i()()()}if(s&2){let p=T(7);c("pageData",l.menuData)("hideSearchDropdown",!0),o(2),c("ngIf",l.LastSync),o(3),c("ngIf",l.variantList.length>0)("ngIfElse",p)}},dependencies:[k,L,U,B,j,ie],encapsulation:2})};var Qe=[{path:"Products",component:z},{path:"Orders",component:G},{path:"**",redirectTo:"Products",pathMatch:"full"}],W=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[q.forChild(Qe),q]})};var oe=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[Y,W,re,ne]})};export{oe as OfflineModule};
|
|
1
|
+
import{a as te}from"./chunk-XZR3IMWZ.js";import{e as U,f as re}from"./chunk-TSBV5MA4.js";import"./chunk-VGNMBCUC.js";import{a as Q,b as H}from"./chunk-DV4MQXAE.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import{D as A}from"./chunk-CD3BSGAP.js";import"./chunk-JOXTERIM.js";import{F as ie,N as ne}from"./chunk-5OS5VELO.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import"./chunk-RVXZOIFQ.js";import"./chunk-TDO7VOF5.js";import"./chunk-NOQM2VPB.js";import{d as ee}from"./chunk-ZZGSAFGO.js";import"./chunk-PZANARAM.js";import{$a as o,Ac as C,Bc as b,Cc as X,Fc as P,Ib as n,Jb as i,Kb as h,Lb as I,Mb as D,Ob as O,Qb as y,Rb as m,Td as q,Vd as Z,Yc as k,Yd as R,Zc as L,d as w,da as u,db as x,dc as T,ec as r,ed as j,fc as v,gc as f,gd as B,hc as K,jd as Y,ka as M,kb as $,lb as N,ob as V,qb as d,va as g,vb as c,wa as S,zc as _}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";function ue(t,a){if(t&1){let e=O();n(0,"a",19),y("click",function(){g(e);let l=m();return S(l.convertToCsv())}),h(1,"i",20),r(2," Export Fail"),i()}}function xe(t,a){if(t&1){let e=O();n(0,"a",21),y("click",function(){g(e);let l=m();return S(l.uploadOrders())}),h(1,"i",22),r(2," Send Transaction"),i()}}function ve(t,a){t&1&&(n(0,"th",23)(1,"i"),r(2,"Actions"),i()())}function ge(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),v(e==null||e.Variant==null?null:e.Variant.Name)}}function Se(t,a){if(t&1&&(n(0,"div",28),d(1,ge,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function he(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e==null?null:e.Quantity," ")}}function Oe(t,a){if(t&1&&(n(0,"div",30),d(1,he,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function ye(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Price)," ")}}function Ce(t,a){if(t&1&&(n(0,"div",30),d(1,ye,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function be(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function Ee(t,a){if(t&1&&(n(0,"div",30),d(1,be,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Ie(t,a){if(t&1){let e=O();n(0,"td",31)(1,"i",32),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeOrder(l))}),i()()}}function De(t,a){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,Se,2,1,"div",25),i(),n(8,"td"),d(9,Oe,2,1,"div",26),i(),n(10,"td"),d(11,Ce,2,1,"div",26),i(),n(12,"td"),d(13,Ee,2,1,"div",26),i(),d(14,Ie,2,0,"td",27),i()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,7,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(),c("ngIf",s.roleService.sell.Delete)}}function Te(t,a){if(t&1&&(I(0),d(1,De,15,10,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.offlineOrders)}}function Pe(t,a){t&1&&(n(0,"td",33)(1,"h4",34),r(2,"There is no Offline Order"),i()())}function Fe(t,a){if(t&1&&(I(0),n(1,"span"),r(2),n(3,"strong"),r(4),i(),n(5,"strong"),r(6),_(7,"number"),i(),n(8,"strong"),r(9),_(10,"number"),i()(),D()),t&2){let e=m().$implicit;o(2),f("",e==null||e.Variant==null?null:e.Variant.Name," "),o(2),f(" ",e.Quantity+" x"," "),o(2),f(" ",C(7,4,e.Price)+" ="," "),o(3),f(" ",C(10,6,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function we(t,a){if(t&1&&(n(0,"div",40),d(1,Fe,11,8,"ng-container",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Me(t,a){if(t&1&&(n(0,"div",41),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e.Message," ")}}function $e(t,a){if(t&1){let e=O();I(0),n(1,"a",42),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeFailedOrder(l))}),h(2,"i",43),i(),D()}}function Ne(t,a){if(t&1){let e=O();n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,we,2,1,"div",35),i(),n(8,"td"),d(9,Me,2,1,"div",36),i(),n(10,"td",37)(11,"a",38),y("click",function(){let l=g(e).$implicit,p=m(2);return S(p.uploadFailedOrder(l))}),h(12,"i",39),i(),d(13,$e,3,0,"ng-container",29),i()()}if(t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,5,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngIf",e.Message),o(4),c("ngIf",s.roleService.sell.Delete)}}function Ve(t,a){if(t&1&&(I(0),d(1,Ne,14,8,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.failedOrders)}}function ke(t,a){t&1&&(n(0,"td",44)(1,"h4",34),r(2,"There is no Failed Order"),i()())}var G=class t extends Q{constructor(e,s,l,p,E,F){super(e);this.httpService=s;this.localData=l;this.csvConverter=p;this.toastr=E;this.roleService=F;this.destroy$=new w,this.pageData={Header:"Offline Orders"}}pageData;offlineOrders=[];failedOrders=[];destroy$;ngOnInit(){this.menuData$.pipe(u(this.destroy$)).subscribe(()=>{this.getOfflineOrders(),this.getFailedOrders()})}removeOrder(e){this.localData.removeOrder(e.id).subscribe({next:()=>{this.toastr.success("Successfully removed order "+e.Order.Number,"Offline Order Deleted!"),this.getOfflineOrders()},error:s=>{this.toastr.warning("Failed to remove order "+e.Order.Number,"Failed to delete order!")}})}getOfflineOrders(){this.localData.findAllOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.offlineOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}getFailedOrders(){this.localData.getFailedOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.failedOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}uploadFailedOrder(e){this.localData.uploadFailedOrder(e).pipe(u(this.destroy$)).subscribe({next:()=>{this.toastr.success("Successfully uploaded order "+e.Order.Number,"Sync Successful!"),this.getFailedOrders()},error:()=>{this.toastr.error("Failed to sync failed order "+e.Order.Number,"Error!")}})}removeFailedOrder(e){this.localData.removeFailedOrder(e.id).pipe(u(this.destroy$)).subscribe({next:s=>{this.toastr.success("Success to remove failed offline order","Error!"),this.getFailedOrders()},error:s=>{this.toastr.error("Failed to remove failed offline order","Error!")}})}uploadOrders(){this.localData.uploadOrders().pipe(u(this.destroy$)).subscribe({next:e=>{e?this.getOfflineOrders():(this.getOfflineOrders(),this.getFailedOrders())},error:e=>{this.getOfflineOrders(),this.getFailedOrders()}})}convertToCsv(){this.csvConverter.convertToCSV(this.getExportData(),"Fail_Transaction.csv")}getExportData(){let e=[["Number","Date","Item","Qty","Price","Total"]];return this.failedOrders.forEach(s=>{s.Items.forEach(l=>{let p=s.Order.Number.toString(),E=s.Order.Date.toLocaleString(),F=l.Quantity.toString(),ae=l.Price.toString(),le=(l.Quantity*l.UnitQuantity*(l.Price*(1-l.Discount/100))-l.DiscountAmount).toString(),se=[p,E,l.Variant.Name,F,ae,le];e.push(se)})}),e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A),x(te),x(Z),x(ee))};static \u0275cmp=$({type:t,selectors:[["pos-orders"]],standalone:!1,features:[V],decls:54,vars:10,consts:[["noOrders",""],["noFailedOrders",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary me-6",3,"click",4,"ngIf"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-10","mb-12"],[1,"col-md"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[1,"border-end",2,"width","130px"],[1,"border-end",2,"width","90px"],[1,"border-end"],[1,"border-end","text-end",2,"width","103px"],[1,"border-end","text-end",2,"width","200px"],["class","text-center","style","width: 90px",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"row","mt-12"],[1,"border-end",2,"width","102px"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-paper-plane"],[1,"text-center",2,"width","90px"],[4,"ngFor","ngForOf"],["class","list-unstyled text-start",4,"ngFor","ngForOf"],["class","list-unstyled text-end",4,"ngFor","ngForOf"],["class","text-center text-danger",4,"ngIf"],[1,"list-unstyled","text-start"],[4,"ngIf"],[1,"list-unstyled","text-end"],[1,"text-center","text-danger"],[1,"fa-solid","fa-xmark","fa-2x","cursor-pointer",3,"click"],["colspan","7"],[1,"text-center","mt-2"],["class","list-inline text-start",4,"ngFor","ngForOf"],["class","text-danger",4,"ngIf"],[1,"d-flex","justify-content-center"],["matTooltipPosition","above","matTooltip","Sync",1,"ms-2","me-2","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-cloud-arrow-up","text-primary","fa-2x"],[1,"list-inline","text-start"],[1,"text-danger"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-regular","fa-xmark-circle","text-primary","fa-2x"],["colSpan","5"]],template:function(s,l){if(s&1&&(n(0,"mainpanel-cmp",2)(1,"actions"),d(2,ue,3,0,"a",3)(3,xe,3,0,"a",4),i(),n(4,"content")(5,"div",5)(6,"div",6)(7,"div",7)(8,"h5"),r(9,"Offline Orders"),i(),n(10,"i"),r(11,"Waiting to be uploaded to the server!"),i(),n(12,"table",8)(13,"thead",9)(14,"tr")(15,"th",10),r(16,"Number"),i(),n(17,"th",11),r(18,"Date"),i(),n(19,"th",12),r(20,"item"),i(),n(21,"th",13),r(22," Qty "),i(),n(23,"th",14),r(24," Price "),i(),n(25,"th",14),r(26," Total "),i(),d(27,ve,3,0,"th",15),i()(),n(28,"tbody"),d(29,Te,2,1,"ng-container",16)(30,Pe,3,0,"ng-template",null,0,P),i()()()(),n(32,"div",17)(33,"div",7)(34,"h5"),r(35,"Synchronization Errors"),i(),n(36,"i"),r(37,"Exception occured when trying to upload these orders"),i(),n(38,"table",8)(39,"thead",9)(40,"tr")(41,"th",11),r(42,"Number"),i(),n(43,"th",11),r(44,"Date"),i(),n(45,"th",12),r(46,"item"),i(),n(47,"th",12),r(48,"Sync exception"),i(),h(49,"th",18),i()(),n(50,"tbody"),d(51,Ve,2,1,"ng-container",16)(52,ke,3,0,"ng-template",null,1,P),i()()()()()()()),s&2){let p=T(31),E=T(53);c("pageData",l.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),o(2),c("ngIf",(l.failedOrders==null?null:l.failedOrders.length)>0),o(),c("ngIf",l.offlineOrders.length>0),o(24),c("ngIf",l.roleService.sell.Delete),o(2),c("ngIf",l.offlineOrders.length>0)("ngIfElse",p),o(22),c("ngIf",l.failedOrders.length>0)("ngIfElse",E)}},dependencies:[k,L,U,B,j],styles:[".cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}"]})};function Le(t,a){if(t&1&&(n(0,"div",5),h(1,"i",6),r(2),_(3,"date"),i()),t&2){let e=m();o(2),f(" ",b(3,1,e.LastSync,"dd MMM yyyy HH:mm:ss")," ")}}function je(t,a){if(t&1&&(n(0,"tr")(1,"td",15),r(2),i(),n(3,"td",16),r(4),i(),n(5,"td"),r(6),i(),n(7,"td",11),r(8),_(9,"number"),i()()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.ID),o(2),v(e.Name),o(2),v(e.Code),o(2),K(" ",s.currency," ",b(9,5,e.UnitPrice,"1.0-4")," ")}}function Be(t,a){if(t&1&&(n(0,"table",7)(1,"thead",8)(2,"tr",9)(3,"th",10),r(4,"ID"),i(),n(5,"th",10),r(6,"Name"),i(),n(7,"th",10),r(8,"Code"),i(),n(9,"th",11),r(10,"Unit Price"),i()()(),n(11,"tbody"),d(12,je,10,8,"tr",12),_(13,"sortBy"),i(),n(14,"tfoot")(15,"tr",13)(16,"td",14)(17,"strong"),r(18),_(19,"number"),i()()()()()),t&2){let e=m();o(12),c("ngForOf",X(13,2,e.variantList,"asc","Name")),o(6),f("",C(19,6,e.variantList.length)," Product ")}}function Re(t,a){t&1&&(n(0,"h3",17),r(1,"Product has not been synced yet!"),i())}var z=class t extends Q{constructor(e,s,l){super(e);this.httpService=s;this._localDataService=l;this.destroy$=new w}variantList=[];OriginalList=[];LastSync;currency;destroy$;ngOnInit(){this.menuData$.subscribe(e=>{this.getVariants(),this.getSyncDate(),this.getCurrency()})}getVariants(){this._localDataService.findAllVariant().pipe(u(this.destroy$)).subscribe({next:e=>{this.OriginalList=e,this.variantList=this.OriginalList},error:e=>{console.error(e)}})}getSyncDate(){this._localDataService.getSyncTime().pipe(u(this.destroy$)).subscribe(e=>{this.LastSync=new Date(e.time)})}getCurrency(){this._localDataService.getPOSStorage().pipe(u(this.destroy$)).subscribe(e=>{e&&(this.currency=e.Currencies[0].Symbol)})}filterList(e){this.variantList=this.OriginalList.filter(s=>s.Name.includes(e))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A))};static \u0275cmp=$({type:t,selectors:[["pos-products"]],standalone:!1,features:[V],decls:8,vars:5,consts:[["noProduct",""],[3,"textChange","pageData","hideSearchDropdown"],["class","h5",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid","class","table",4,"ngIf","ngIfElse"],[1,"h5"],[1,"fa-solid","fa-sync-alt"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-start"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"text-start","empty-column"],[2,"max-width","100px"],[2,"max-width","300px"],[1,"text-center","mt-4"]],template:function(s,l){if(s&1){let p=O();n(0,"mainpanel-cmp",1),y("textChange",function(F){return g(p),S(l.filterList(F))}),n(1,"actions"),d(2,Le,4,4,"div",2),i(),n(3,"content")(4,"div",3),d(5,Be,20,8,"table",4)(6,Re,2,0,"ng-template",null,0,P),i()()()}if(s&2){let p=T(7);c("pageData",l.menuData)("hideSearchDropdown",!0),o(2),c("ngIf",l.LastSync),o(3),c("ngIf",l.variantList.length>0)("ngIfElse",p)}},dependencies:[k,L,U,B,j,ie],encapsulation:2})};var Qe=[{path:"Products",component:z},{path:"Orders",component:G},{path:"**",redirectTo:"Products",pathMatch:"full"}],W=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[q.forChild(Qe),q]})};var oe=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[Y,W,re,ne]})};export{oe as OfflineModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-XKUQPHUA.js";import{d as Y}from"./chunk-
|
|
1
|
+
import{a as Z}from"./chunk-XKUQPHUA.js";import{d as Y}from"./chunk-6G37ZXRX.js";import{a as H,b as G}from"./chunk-ITLMINSX.js";import{c as X}from"./chunk-SV4HJFAL.js";import{b as J}from"./chunk-TZ74SUXJ.js";import{a as Q}from"./chunk-V52QD5BS.js";import{e as U}from"./chunk-TSBV5MA4.js";import{b as K}from"./chunk-DV4MQXAE.js";import{g as z}from"./chunk-3YKVLHZG.js";import{h as B,o as j}from"./chunk-RVXZOIFQ.js";import{d as q}from"./chunk-ZZGSAFGO.js";import{$a as l,Bc as v,Fc as V,Ib as i,Jb as r,Kb as R,Ob as x,Od as k,Qb as C,Rb as d,Rd as N,Vd as O,Yc as W,Yd as A,Zc as M,db as y,ec as o,ed as P,fc as w,gc as T,jc as u,kb as L,kc as S,lc as f,ob as E,qb as D,tc as I,va as s,vb as m,wa as c,wc as b,zc as h}from"./chunk-UXRO4UFY.js";var ee=(p,g,t,n,e,a)=>({LogisticServiceID:p,EntityID:g,From:t,To:n,StartTime:e,EndTime:a}),te=(p,g,t)=>({From:p,To:g,LogisticsServiceID:t});function ie(p,g){if(p&1){let t=x();i(0,"button",5),C("click",function(){s(t);let e=d();return c(e.openExportModal())}),R(1,"i",6),o(2," Export "),r()}}function ae(p,g){if(p&1){let t=x();i(0,"div",7)(1,"h6"),o(2,"Outlet"),r(),i(3,"outlet-selector",8),f("ngModelChange",function(e){s(t);let a=d();return S(a.pageData.Filter.EntityID,e)||(a.pageData.Filter.EntityID=e),c(e)}),r(),i(4,"h6"),o(5,"From"),r(),i(6,"datepicker",9),f("dateChange",function(e){s(t);let a=d();return S(a.pageData.Filter.From,e)||(a.pageData.Filter.From=e),c(e)}),r(),i(7,"h6"),o(8,"To"),r(),i(9,"datepicker",10),f("dateChange",function(e){s(t);let a=d();return S(a.pageData.Filter.To,e)||(a.pageData.Filter.To=e),c(e)}),r(),i(10,"h6"),o(11,"Time"),r(),i(12,"div",11)(13,"div",12)(14,"app-timepicker",13),f("timeChange",function(e){s(t);let a=d();return S(a.pageData.Filter.StartTime,e)||(a.pageData.Filter.StartTime=e),c(e)}),r()(),i(15,"div",12)(16,"app-timepicker",13),f("timeChange",function(e){s(t);let a=d();return S(a.pageData.Filter.EndTime,e)||(a.pageData.Filter.EndTime=e),c(e)}),r()()()()}if(p&2){let t=d();l(3),m("accessType",2),u("ngModel",t.pageData.Filter.EntityID),m("outlets",t.pageData.Options==null?null:t.pageData.Options.Entities),l(3),u("date",t.pageData.Filter.From),l(3),u("date",t.pageData.Filter.To),l(5),m("fullWidth",!0),u("time",t.pageData.Filter.StartTime),l(2),m("fullWidth",!0),u("time",t.pageData.Filter.EndTime)}}function re(p,g){if(p&1&&(i(0,"tr")(1,"td"),o(2),r(),i(3,"td"),o(4),r(),i(5,"td",23)(6,"a",24),h(7,"date"),h(8,"date"),o(9),r()(),i(10,"td",23)(11,"a",25),h(12,"date"),h(13,"date"),o(14),r()(),i(15,"td",23),o(16),r()()),p&2){let t=g.$implicit,n=g.index,e=d(2);l(2),w(n+1),l(2),w(t.Name),l(2),m("queryParams",b(19,ee,t.ID,e.pageData.Filter.EntityID,v(7,7,e.pageData.Filter.From,"yyyy-MM-dd"),v(8,10,e.pageData.Filter.To,"yyyy-MM-dd"),e.pageData.Filter.StartTime,e.pageData.Filter.EndTime)),l(3),T(" ",t.Trans," "),l(2),m("queryParams",I(26,te,v(12,13,e.pageData.Filter.From,"yyyy-MM-dd"),v(13,16,e.pageData.Filter.To,"yyyy-MM-dd"),t.ID)),l(3),T(" ",t.Qty," "),l(2),w(t.Weight)}}function ne(p,g){if(p&1){let t=x();i(0,"content")(1,"div",14)(2,"table",15),C("matSortChange",function(e){s(t);let a=d();return c(a.sortData(e))}),i(3,"thead",16)(4,"tr")(5,"th",17),o(6,"No"),r(),i(7,"th"),o(8,"Logistics Service Name"),r(),i(9,"th",18),o(10,"Trans"),r(),i(11,"th",19),o(12,"Qty"),r(),i(13,"th",20),o(14,"Weight "),i(15,"small",21),o(16,"(gram)"),r()()()(),i(17,"tbody"),D(18,re,17,30,"tr",22),r()()()()}if(p&2){let t=d();l(18),m("ngForOf",t.data.Data)}}var $=class p extends Q{constructor(t,n,e,a,F,_){super(t,n,"Report/GetLogisticsService","ReportLoader/GetLogisticsService",e,a);this.matDialog=F;this.roleService=_}originalData=[];postInit(t){this.originalData=t.Data}sortData(t){let n=this.data.Data.slice();if(!t.active||t.direction===""){this.data.Data=this.originalData;return}this.data.Data=n.sort((e,a)=>this.compare(e[t.active],a[t.active],t.direction==="asc"))}openExportModal(){this.matDialog.open(J,{data:{title:"Logistic Service",exportTypes:[{ID:"ReportExport/LogisticService",Value:"Default",FileName:"Logistics Service"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}onChangeTime(t,n){let e=t.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[n]=e}static \u0275fac=function(n){return new(n||p)(y(K),y(A),y(O),y(k),y(z),y(q))};static \u0275cmp=L({type:p,selectors:[["POS-logistics-service-report"]],standalone:!1,features:[E],decls:9,vars:6,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",1,"btn","btn-outline-secondary"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","50px"],["mat-sort-header","Trans",1,"align-right"],["mat-sort-header","Qty",1,"align-right"],["mat-sort-header","Weight",1,"align-right",2,"width","180px"],[1,"fst-italic","text-dark"],[4,"ngFor","ngForOf"],[1,"text-end"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",3,"queryParams"],["routerLink","/menu/Reports/Sales_Report/Standard/Products_Sold",3,"queryParams"]],template:function(n,e){if(n&1){let a=x();i(0,"mainpanel-cmp",1),f("textChange",function(_){return s(a),S(e.pageData.Filter.Name,_)||(e.pageData.Filter.Name=_),c(_)}),C("onSubmit",function(){return s(a),c(e.searchFromPageOne())}),f("filterChange",function(_){return s(a),S(e.pageData.Filter,_)||(e.pageData.Filter=_),c(_)}),i(1,"actions"),D(2,ie,3,0,"button",2),i(3,"a",3),o(4," View Detail "),r()(),i(5,"filters"),D(6,ae,17,9,"ng-template",null,0,V),r(),D(8,ne,19,1,"content",4),r()}n&2&&(m("pageData",e.menuData),u("text",e.pageData.Filter.Name),m("isFilterOnDropdown",!1),u("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(6),m("ngIf",e.data))},dependencies:[W,M,N,B,j,U,Y,H,G,Z,X,P],encapsulation:2})};export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E,b as T}from"./chunk-
|
|
1
|
+
import{a as E,b as T}from"./chunk-UEQT5HE5.js";import{c as N}from"./chunk-VSF6PYZW.js";import{c as F}from"./chunk-JOXTERIM.js";import{F as M}from"./chunk-RVXZOIFQ.js";import{$a as i,Fa as b,Ib as a,Jb as s,Ob as f,Qb as x,Rb as r,Yc as I,Zc as w,ec as d,gc as _,jd as y,ka as C,kb as k,lb as v,qb as m,va as h,vb as c,wa as g,zb as O}from"./chunk-UXRO4UFY.js";var p=class{viewGrid;totalColumn;constructor(t,e){this.viewGrid=t||!1,this.totalColumn=e||2}};function S(o,t){if(o&1){let e=f();a(0,"li",4)(1,"mat-checkbox",5),x("change",function(){let l=h(e).$implicit,u=r(2);return g(u.change(l.ID))}),d(2),s()()}if(o&2){let e=t.$implicit,n=r(2);i(),c("checked",n.checkingCheckbox(e.ID))("value",e.ID)("name",n.name),i(),_("",e.Name," ")}}function V(o,t){if(o&1&&(a(0,"ul",2),m(1,S,3,4,"li",3),s()),o&2){let e=r();i(),c("ngForOf",e.options)}}function $(o,t){if(o&1){let e=f();a(0,"li",4)(1,"mat-checkbox",8),x("change",function(){let l=h(e).$implicit,u=r(2);return g(u.change(l.ID))}),d(2),s()()}if(o&2){let e=t.$implicit,n=r(2);O("col-"+12/(n.config!=null&&n.config.totalColumn?n.config==null?null:n.config.totalColumn:2)),i(),c("checked",n.checkingCheckbox(e.ID))("value",e.ID)("name",n.name),i(),_("",e.Name," ")}}function G(o,t){if(o&1&&(a(0,"ul",6),m(1,$,3,6,"li",7),s()),o&2){let e=r();i(),c("ngForOf",e.options)}}var D=class o{model;options;name;config;modelChange=new b;ngOnInit(){this.config==null&&(this.config=new p)}change(t){this.checkingCheckbox(t)?this.model=this.removeItemRow(this.model,t):this.model.push(t),this.modelChange.emit(this.model)}checkingCheckbox(t){return this.model.filter(n=>n==t).length>0}removeItemRow(t,e){let n=t.findIndex(l=>l==e);return t.splice(n,1),t}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=k({type:o,selectors:[["checkbox-options"]],inputs:{model:"model",options:"options",name:"name",config:"config"},outputs:{modelChange:"modelChange"},standalone:!1,decls:2,vars:2,consts:[["class","checkbox-group",4,"ngIf"],["class","checkbox-group view-grid row",4,"ngIf"],[1,"checkbox-group"],["class","checkbox-group-item",4,"ngFor","ngForOf"],[1,"checkbox-group-item"],[3,"change","checked","value","name"],[1,"checkbox-group","view-grid","row"],["class","checkbox-group-item",3,"class",4,"ngFor","ngForOf"],[1,"label-custom",3,"change","checked","value","name"]],template:function(e,n){e&1&&m(0,V,2,1,"ul",0)(1,G,2,1,"ul",1),e&2&&(c("ngIf",!n.config.viewGrid),i(),c("ngIf",n.config.viewGrid))},dependencies:[E,I,w],encapsulation:2})},R=class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=v({type:o});static \u0275inj=C({imports:[N,T,y,M,F]})};export{p as a,D as b,R as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-ZZGSAFGO.js";import{db as u,ed as l,gd as p,ka as y,lb as I,nb as s,xd as A}from"./chunk-UXRO4UFY.js";var g=class a{transform(e){return e.map(t=>t.UnitPrice).reduce((t,r)=>Math.max(t,r),0)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"highestPrice",type:a,pure:!0,standalone:!1})},S=class a{transform(e){return e.map(t=>t.UnitPrice).reduce((t,r)=>Math.min(t,r),0)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"lowestPrice",type:a,pure:!0,standalone:!1})},C=class a{transform(e,t){let r=e.filter(i=>i.Key==t);return r.length==0?0:r[0].Value}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"groupStock",type:a,pure:!0,standalone:!1})},G=class a{transform(e){return e!=null?e.replace(/\n/g,"<br />"):e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"images",type:a,pure:!0,standalone:!1})};var D=class a{transform(e){var t=new Date(e),r=new Date,i=r.valueOf()-t.valueOf(),n=Math.floor(i%864e5/36e5),o=Math.round(i%864e5%36e5/6e4);return n>0?o+n*60:o}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"durationTime",type:a,pure:!0,standalone:!1})},v=class a{transform(e){let r="",i=e<1440?null:(e-e%1440)/1440;i&&(r=`${i} Day`,i>1&&(r=r+"s"));let n=(e%1440-e%1440%60)/60;n&&(r=r+` ${n} Hour`,n>1&&(r=r+"s"));let o=e%60;return o&&(r=r+` ${o} Minute`,o>1&&(r=r+"s")),r.trim()}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"durationDaysHour",type:a,pure:!0,standalone:!1})},f=class a{transform(e,t,r,i){let n=0;return e&&!r&&!i&&e.forEach(o=>n+=o[t]-0),r&&i&&e.forEach(o=>{o[r]==i&&(n+=o[t]-0)}),n}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sum",type:a,pure:!1,standalone:!1})},O=class a{transform(e,t,r){let i=0;return e&&e.forEach(n=>i+=n[t][r]),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumArray",type:a,pure:!1,standalone:!1})},b=class a{transform(e,t,r,i){let n=0;return e&&e.forEach(o=>{m.IsNotEmpty(o[t][r])&&(n+=o[t][r][i])}),n}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumNestedArray",type:a,pure:!1,standalone:!1})},T=class a{transform(e,t,r,i,n){let o=0;return e&&e.forEach(c=>{let d=c[t].find(it=>it[i]===r);d!==void 0&&(o+=d[n])}),o}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumWithID",type:a,pure:!1,standalone:!1})},B=class a{transform(e,t,r){let i=0;return e&&e.forEach(n=>i+=n[t]*n[r]),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumMultiply",type:a,pure:!1,standalone:!1})},h=class a{transform(e,t,r){let i=0;return e&&e.forEach(n=>i+=n[t][r]-0),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"SumWithIndex",type:a,pure:!1,standalone:!1})},P=class a{transform(e=[],t){let r=JSON.parse(JSON.stringify(e));if(r.length>0){r=r.sort((n,o)=>n[t]-o[t]);let i=r[0][t];if(r.length>1){let n=r[r.length-1][t];return i===n?i.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"):i.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")+" - "+n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}else return i.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}else return"-"}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"MinToMax",type:a,pure:!0,standalone:!1})},L=class a{transform(e,t,r=0){if(!e)return e;let i=t?parseInt(t,10):10;return e.length>i?e.substring(r,i)+"...":e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"limitTo",type:a,pure:!0,standalone:!1})};var w=class a{transform(e){return e!=null?e.replace(/\n/g,"<br />"):e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"newlines",type:a,pure:!0,standalone:!1})};var F=class a{transform(e,t,r){t=t??2;let i=Math.pow(10,t);return r&&(e=e-e*i%5/i),Math.round(e*i)/i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"DecimalRound",type:a,pure:!0,standalone:!1})},k=class a{constructor(e){this.decimalPipe=e}transform(e,t){if(t=m.IsNotEmpty(t)?t:0,e=m.IsNotEmpty(e)?e:0,!e)return;typeof e=="string"&&(e=e.split(",").join(""),e=parseFloat(e));let r=e?.toFixed(4);for(r=r.substr(r.length-4);r.substr(r.length-1,1)=="0";)r=r.substr(0,r.length-1);let i=r.length>t?r.length:t,n="1."+i.toString()+"-"+i.toString();return this.decimalPipe.transform(e,n)}static \u0275fac=function(t){return new(t||a)(u(p,16))};static \u0275pipe=s({name:"TrailingZero",type:a,pure:!0,standalone:!1})};var V=class a{transform(e,t,r){let i=e.find(n=>n[t]==r);return i??{}}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"find",type:a,pure:!0,standalone:!1})},R=class a{transform(e,t){return e==""||e==null?"":(t==""||t==null||(t=t.replace("{0}",e)),t)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"showIfNotNullOrEmptyString",type:a,pure:!0,standalone:!1})};var x=class a{transform(e,t){return t===void 0||t===""?e:e.filter(r=>r.Name.toLowerCase().indexOf(t.toLowerCase())!==-1)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"FilterByName",type:a,pure:!0,standalone:!1})};var M=class a{transform(e,t,r="Name"){return t===void 0?e:typeof t=="number"?e.filter(i=>i[r]==t):e.filter(i=>i[r].toString().toLowerCase().indexOf(t.toLowerCase())!==-1)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"Filter",type:a,pure:!0,standalone:!1})},N=class a{transform(e,t,r){let i=[];return i=e.filter(n=>n[t]<r),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"GetArrayWithSmallerCondition",type:a,pure:!0,standalone:!1})},E=class a{transform(e,t,r){let i=[];return i=e.filter(n=>n[t]>r),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"GetArrayWithGreaterCondition",type:a,pure:!0,standalone:!1})},U=class a{transform(e,t,r){if(e){if(r==""||r==null||r==null)return e;{let i=[];for(let n=0;n<t.length;n++){let o=e.filter(c=>c[t[n]]!=null);o=o.filter(c=>c[t[n]].toLowerCase().indexOf(r.toLowerCase())>-1),i=i.concat(o)}return i}}else return[]}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"FilterByArray",type:a,pure:!0,standalone:!1})},j=class a{constructor(e){this.sanitizer=e}transform(e){return this.sanitizer.bypassSecurityTrustHtml(e)}static \u0275fac=function(t){return new(t||a)(u(A,16))};static \u0275pipe=s({name:"SafeHtml",type:a,pure:!0,standalone:!1})},H=class a{transform(e){return Math.ceil(e)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"RoundUp",type:a,pure:!0,standalone:!1})},W=class a{transform(e){let t;switch(e){case 1:t="January";break;case 2:t="February";break;case 3:t="March";break;case 4:t="April";break;case 5:t="May";break;case 6:t="June";break;case 7:t="July";break;case 8:t="August";break;case 9:t="September";break;case 10:t="October";break;case 11:t="November";break;case 12:t="December";break;default:t="-"}return t}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"Month",type:a,pure:!0,standalone:!1})},J=class a{transform(e,t){let r=[];return e.forEach(i=>{i[t].forEach(n=>{r.push(n)})}),r}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"GetChildrenArray",type:a,pure:!0,standalone:!1})},$=class a{transform(e,t){let r=0;return e.forEach(i=>{i!=0&&(r+=i[t]?i[t]:0)}),r>0}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"HideSumZero",type:a,pure:!0,standalone:!1})},Q=class a{transform(e,t){var r=new Date(e),i=new Date(t),n=i.getTime()-r.getTime();return Math.round(n/6e4)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"DateDiffInMinute",type:a,pure:!0,standalone:!1})},z=class a{transform(e){return new Date(e)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"ToDateString",type:a,pure:!0,standalone:!1})},K=class a{transform(e,t="",r=""){return!e||t===""||!t||e.length<=1?e:!r||r===""?t==="asc"?e.sort():e.sort().reverse():(e=e.sort((i,n)=>{let o=t==="asc";switch(typeof i[r]){case"string":return this.compare(i[r]?.toLocaleLowerCase(),n[r]?.toLocaleLowerCase(),o);case"number":return this.compare(i[r],n[r],o);default:return 0}}),e)}compare(e,t,r){return(e<t?-1:1)*(r?1:-1)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sortBy",type:a,pure:!0,standalone:!1})},Y=class a{constructor(e){this.datePipe=e}transform(e,t){return t=t||"dd/MM/yyyy",e&&e!="0001-01-01T00:00:00"?this.datePipe.transform(e,t):"-"}static \u0275fac=function(t){return new(t||a)(u(l,16))};static \u0275pipe=s({name:"IsMinDate",type:a,pure:!0,standalone:!1})};var Z=class a{transform(e,t){let r=!0;try{let i="";return t=t||"Name",e.forEach((n,o)=>{o==0?i=n[t]:i!=n[t]&&(r=!1)}),r}catch{return!0}}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"checkPropValueIsSame",type:a,pure:!0,standalone:!1})},q=class a{transform(e,t,r,i){let n=e.filter(o=>o[t]==r);return n.length>0?n[0][i]:0}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"FilterGetAmount",type:a,pure:!0,standalone:!1})},X=class a{transform(e){return e?"Yes":"No"}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"YesNo",type:a,pure:!0,standalone:!1})};var _=class a{transform(e,t,r){let i=t.Sales/100*e[0].Rate;return r==1&&(i=t.Tax-i),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"TaxDefault",type:a,pure:!0,standalone:!1})},tt=class a{transform(e,t,r){let i=e.toLowerCase(),n;return n=i.replace(t,`<b class="${r}">${t}</b>`),n}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"SearchNote",type:a,pure:!0,standalone:!1})},et=class a{transform(e,t=30){return e.length>t?e.substring(0,t)+"...":e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"TruncateText",type:a,pure:!0,standalone:!1})},at=class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=I({type:a});static \u0275inj=y({providers:[p,f,l,P]})};var rt=class{static GetPOSStorage="/API/POS/LoadPOS";static GetPOSDataByID="/API/POS/GetPOSDataBySalesOrderID";static GetRegisterInfo="/API/POS/GetRegisterInfoByID";static GenerateNumber="/API/POS/GenerateNumber";static RefreshToken="/API/Authentication/RefreshToken";static RemovePark="/API/POS/RemovePark";static VoidPark="/API/POS/VoidPark";static ReturInvoice="/API/POS/ReturInvoiceByEntityIDAndNumber";static MergePark="/API/POS/MergePark";static ParkOrder="/API/POS/SubmitParkOrder";static GetPark="/API/POS/GetParkByEntityID";static GetOutStanding="/API/POS/GetOutStandingByEntityID";static GetVacant="/API/POS/GetParkInfoByEntityID";static RecordOpeningCash="/API/POS/RecordOpeningCash";static OpenRegister="/API/POS/LoadRegister";static SplitOrder="/API/POS/split_parkedorder";static GetPackageID="/API/POS/GetPackageID";static SubmitOrder="/API/POS/SubmitInvoice";static SyncProducts="/API/POSSync/Products";static SyncCustomer="/API/POSSync/Customers";static SynOutletPrice="/API/POSSync/OutletPrices";static SynOutlet="/API/POSSync/Outlets";static SyncPark="/API/POSSync/Parks";static GetRewardByPromotionID="/API/POS/GetRewardByPromotionID";static GetListPromotion="/API/POS/Promotion";static EnabledPromotion="/API/Promotion/UpdateEnabled";static PromotionPushToPOS="/API/promotion/PushToPOS";static GetCustomerSuggestionCode="/API/POS/GetSuggestionCustomerCode";static GetCustomerPrivilegeByID="/API/Contact/GetPrivilegeByCustomerID";static GetCustomerSalesHistory="/API/Contact/GetCustomerSalesHistory";static GetSalesPersonByOutletId="/API/Contact/salesperson/GetSalesPersonByEntityID";static GetVariantByID="/API/catalog/variant/GetVariantByID";static GetVariantByCode="/API/catalog/variant/GetVariantByCode";static GetVariantSuggestionsByEntityID="/API/AC/GetVariantSuggestionByCodeNNameWithEntityID";static GetVariantSuggestions="/API/AC/GetVariantSuggestionByCodeNName";static GetCustomerSuggestions="/API/AC/GetCustomerSuggestion";static BuyReturInvoice="/API/Buy/GetSupplierInvoiceRetur";static GetVariantFormModelByID="/API/catalog/variant/GetVariantFormModelById";static GetVariantWithSameProductID="/API/catalog/variant/GetVariantWithSameProductID";static GetVariantInfoModelById="/API/catalog/variant/GetVariantInfoModelById";static GetTransactionHistoryByVariantId="/API/catalog/variant/GetHistoryByVariantID";static GetStockLogConsistency="/API/Inventory/GetStockLogConsistency";static GetStockLogConsistencyByDate="/API/Inventory/GetStockLogConsistencyByDate";static RefreshAllocatedInventoryCache="/API/Catalog/Variant/RefreshAllocatedByListID";static EraseOutletPrice="/api/catalog/product/DeleteAllOutletPrice";static GetOutletPriceCount="/API/catalog/product/OutletPriceCount";static UpdateROP="/API/Inventory/UpdateROP";static UpdateProductImage="/API/catalog/product/UpdateProductImageUrl";static GetSalesHistory="/Api/catalog/product/GetSalesHistory";static GetPurchaseHistory="/API/catalog/product/GetPurchaseHistory";static GetParkedHistory="/API/catalog/product/GetParkOrder";static ImportProduct="/api/catalog/product/ConfirmImport";static PreviewImportProduct="/api/catalog/product/PreviewUpload";static importOutlet="/API/Outlet/ConfirmImport";static previewImportOutlet="/API/Outlet/PreviewUpload";static MergeProduct="/API/catalog/product/MergeProduct";static CreateVariant="/API/catalog/variant/CreateVariant";static SendInvoiceEmail="/API/Transaction/SendEmail";static SendInvoiceWhatsapp="/API/receipt/Whatsapp";static GetCustomerByCode="/API/Contact/GetByCode";static GetCustomerCode="/API/Contact/GetCode";static GetCustomerEmailByID="/API/Contact/GetEmailByID";static MergeCustomer="/API/Contact/MergeCustomer";static CreateCustomer="/API/Contact/Customer/Create";static CreateCustomerInvoice="/API/POS/AddCustomerByInvoice";static MergeCurrency="/api/Setup/Payment/MergeCurrency";static GetPriceBookByVariantID="/API/catalog/variant/GetPriceBookByVariantID";static ValidateInternalCoupon="/API/PromotionCoupon/ValidateCouponInternal";static validateExternalCoupon="/API/PromotionCoupon/ValidateCouponExternal";static GetCouponData="/API/PromotionCoupon/GetCouponDataAsync";static Invoice="/api/Invoice/InvoiceInfo";static OrdersLoader="/API/OrdersLoader/CustomerInvoice";static Orders="/api/Invoice/CustomerInvoice";static PaymentReceivedLoader="/API/PaymentLoader/DailyPaymentLoader";static PaymentReceived="/API/Payment/DailyPaymentReceived";static CheckOutUrlBuy="/API/Buy/SubmitOrder";static Scanner="/API/AdjustmentLoader/StockTakeByCSV";static AdjustmentLoader="/API/AdjustmentLoader/GetInventoryAdjustmentList";static Adjustment="/API/Adjustment/GetInventoryAdjustmentList";static AdjustmentStorage="/API/Adjustment/GetStorage";static AdjusmentSubmitReview="/API/Adjustment/UpdateToReview";static GetNumberAdjustment="/API/Adjustment/GenerateNumber";static MergeAdjustment="/api/Adjustment/Merge";static GetAccountReceivableLoader="/API/DebtLoader/AccountsReceiveableSummary";static GetAccountReceivableDetailLoader="/API/DebtLoader/AccountsReceiveableDetails";static GetAccountReceivableSummary="/API/Debt/AccountsReceiveableSummary";static getAccountreceivableDetail="/API/Debt/AccountsReceiveableDetails";static BatchCollectionDelete="/API/Debt/InvoiceBatchCollectionDelete";static VoidInvoiceLoader="/API/OrdersLoader/VoidInvoiceLoader";static VoidInvoiceList="/api/RecycleBin/VoidListInvoice";static WaitingPatientList="/API/Treatment/WaitingPatientList";static CheckOutTreatmentByListID="/API/Treatment/CheckOutByListID";static TreatmentRegisterLoader="/API/TreatmentLoader/Registration";static TreatmentRegisterOutletInfo="/API/Treatment/RegistrationGetOutletInfoByEntityID";static TreatmentCustomerInfo="/API/Treatment/RegistrationGetCustomerInfoByCustomerID";static DeleteTreatmentPackageHistory="/API/Treatment/DeleteTreatmentPackageHistoryByID";static DeleteTreatmentArchive="/API/Treatment/DeleteTreatmentArchive";static SubmitTreatementRegistration="/API/Treatment/RegistrationSubmit";static SalesOrderMini="/API/Print/SalesOrderMini";static GetBulkPrint="/API/Tool/getBulkPrint";static GetBulkPrintA4="/API/tool/GetBulkPrintA4";static ProductLoader="/API/catalog/ProductLoader/ProductList";static ProductList="/API/catalog/product/GetProductList";static GetProductByID="/API/catalog/product/GetProductByID";static GetProductByCode="/API/v3/product/Code";static GetAllProductByCategory="/API/catalog/category/GetAllProductByCategory";static DeleteProductList="/API/catalog/product/DeleteProductList";static DeleteVariantInfo="/API/catalog/variant/DeleteVariantInfo";static ProductForm="/API/catalog/ProductLoader/ProductForm";static SubmitProduct="/API/catalog/product/SubmitProduct";static ProductInfo="/API/catalog/ProductLoader/ProductInfoInitial";static ProductCodeByCategory="/api/catalog/product/GetSuggestionProductCodeByCategoryID";static CreateCategory="/API/catalog/category/CreateProductCategory";static CreateBrand="/API/catalog/product/CreateBrand";static CreateTag="/API/catalog/product/CreateTags";static CreateUOM="/API/catalog/product/CreateProductUOM";static VariantInfo="/API/catalog/variant/GetVariantInfoModelById";static VariantFormData="/API/catalog/variant/GetVariantFormInitialData";static VariantForm="/API/catalog/variant/GetVariantFormModelById";static SubmitVariant="/API/catalog/variant/SubmitVariant";static GetVariantOnSelectedIDByID="/API/ProductSetup/GetVariantOnSelectedIDByID";static CreateContact="/API/Contact/Create";static Closure="/API/POS/Closure";static UploadCsv="/API/POS/UploadCsvV2";static GenerateGopayQrCode="/API/Gopay/GenerateQR";static GopayVerifyPayment="/API/Gopay/VerifyQR";static GenerateBcaQrCode="/API/BCA/GenerateQR";static BcaVerifyPayment="/API/BCA/VerifyQR";static InvoiceA4="/API/Print/Invoice";static InvoiceMini="/API/Print/InvoiceMini";static BulkInvoice="/API/Print/BulkInvoice";static BulkSupplierInvoice="/API/Print/BulkSupplierInvoice";static UpdateLastPrintDateTime="/API/Invoice/UpdateLastPrint";static UpdateLastPrintByListID="/API/Invoice/UpdateLastPrintByListID";static UpdateLastPrintDateJoinInvoice="/API/Print/UpdateLastPrintJoinInvoice";static CustomerPoInvoice="/API/Print/CustomerPOInvoice";static InDeliveryInvoice="/API/Print/InDelivery";static InvoiceAndDelivery="/API/Print/InvoiceAndDelivery";static EstimateInvoice="/API/Print/EstimateInvoice";static JobOrderInvoice="/API/Print/JobOrders";static JobOrderMiniInvoice="/API/Print/JobOrderMini";static InvoiceJournal="/Api/Print/Journal";static ClouserReceipt="/API/Print/RegisterClosure";static OutDeliveryInvoice="/Api/Print/OutDelivery";static PackingSlipInvoice="/Api/Print/PrintPackingSlip";static PaymentReceipt="/API/Print/Payment";static AdjustmentInvoice="/API/Print/Adjustment";static SalesOrderReceiptMini="/Api/Print/SalesOrderMini";static WorkOrderReceipt="/Api/Print/WorkOrder";static TransferOrderReceipt="/API/Print/Transfer";static TreatmentInvoice="/API/Print/TreatmentInvoice";static SupplierInvoiceReceipt="/API/Print/SupplierInvoice";static SupplierPoReceipt="/API/Print/SupplierPONG";static UploadCsvBuy="/API/Buy/UploadCsv";static InvoiceInfo="/API/Invoice/InvoiceInfo";static GenerateLink="/API/PayNow/GenerateLink";static LoadFormBuy="/API/Buy2/Load";static BuyGetOutletInfo="/API/Buy2/GetOutletInfo";static BuyGenerateNumber="/API/Buy/GenerateNumber";static BuyGetDataByID="/API/Buy2/GetDataByID";static GetQuickKeyByEntityID="/API/catalog/product/GetQuickKeyByEntityID";static GetVariantStockByID="/API/catalog/variant/GetInventoryByVariantID";static GetSupplierInvoice="/API/Buy/GetSupplierInvoiceRetur";static GetSupplierDTO="/API/Contact/GetSupplierDTO";static UpdateSalesSupplierByID="/API/Buy/UpdateSalesSupplierById";static MergeSupplier="/API/Contact/MergeSupplier";static LoadFormDelivery="/API/TransferOrderLoader/LoadForm";static DeliveryGenerateNumber="/API/TransferOrder/GenerateNumber";static UpdateCourierList="/API/TransferOrder/UpdateCourierList";static SubmitOutletDelivery="/API/TransferOrder/SubmitOrder";static getAllOutletInventory="/API/TransferOrder/ClearOutlet";static GetCourierByOutletDestination="/API/TransferOrder/GetCourierByOutletDestination";static GetCourierInfo="/API/TransferOrderLoader/Info";static UpdateCourier="/API/TransferOrder/UpdateCourierList";static PaymentListSorting="/API/Setup/Payment/SortPaymentMethod";static TaxListSorting="/API/Setup/Payment/SortTax";static SaveTaxSetup="/api/Setup/Payment/SubmitTaxForm";static LoadFormEstimate="/API/Estimate/LoadForm";static EstimateGenerateNumber="/API/Estimate/GenerateNumber";static SubmitEstimate="/API/Estimate/SubmitOrder";static LoadFormAdjustment="/API/Adjustment/LoadForm";static AdjustmentGenerateNumber="/API/Adjustment/GenerateNumber";static SubmitAdjustment="/API/Adjustment/SubmitOrder";static ForecastData="Inventory/Daystozero";static ForecastLoader="InventoryLoader/Daystozero";static ValidateInventory="/api/inventory/GetByListGuidFromCart";static UsageActivities="Developer/DeveloperSpace/API/Activity";static WebhookCouponProviderLoader="Developer/DeveloperSpace/WebhookLoader/WebhookCouponProvider";static WebhookCouponProviderSave="/api/Developer/DeveloperSpace/Webhook/SaveWebhookCouponProvider";static GetVariantSerialPagedLoader="Catalog/SerialLoader/GetVariantSerialPagedLoader";static GetVariantSerialPagination="Catalog/Serial/GetVariantSerialPagination";static SerialInfo="Catalog/Serial/SerialInfo";static GetVariantSerialFormLoader="/api/Catalog/SerialLoader/GetVariantSerialFormLoader";static GetCountVariantSerial="/api/Catalog/Serial/GetCountVariantSerial";static AddVariantSerial="/api/Catalog/Serial/AddVariantSerial";static EditSerial="/api/Catalog/Serial/EditSerial";static GetVariantSerialByListVariantID="/api/Catalog/Serial/GetVariantSerialByListVariantID";static StockAvailableSerial="/api/Catalog/Serial/StockAvailableSerial";static GetVariantSerialByVariantID="/api/Catalog/Serial/GetVariantSerialByVariantID";static GetVariantSerial="/api/Catalog/Serial/GetVariantSerial";static GetVariantBySerial="/api/catalog/serial/GetVariantbySerial";static GetSerialHistory="/api/catalog/serial/History";static GetDashboardSales="/API/Dashboard/Sales";static GetDashboardPayment="/API/Payment/DailyPaymentRecevedHighChart";static GetDashboardPurchase="/API/Dashboard/Purchase";static GetDashboardDebt="/API/Dashboard/Debt";static GetDashboardProduct="/API/Dashboard/Product";static GetDashboardInventory="/API/Dashboard/Inventory";static DeleteListPayment="/api/Payment/DeleteListPayment";static RevokeAccess="/api/user/user/RevokeAccess";static RevokeAccessGroup="/api/user/group/RevokedUsers";static GroupHistoryLoader="/api/user/GroupLoader/UpdateHistory";static GroupHistoryData="/api/user/Group/UpdateHistory";static GetUnfulfilledOrderByNumberOrReferenceNumber="/api/OutboundLogisticsLoader/GetOutboundInfo";static GetUnfulfilledNumberByNumber="/API/AC/SearchUnfulfilledOrderByNumber";static SendTransferOrder="/api/TransferOrder/SendTransferOrder";static ReceiveTransferOrder="/api/TransferOrder/ReceiveTransferOrder";static ApproveDelivery="/api/TransferOrder/ApproveTransferOrder"};export{g as a,S as b,C as c,G as d,D as e,v as f,f as g,O as h,b as i,T as j,B as k,h as l,P as m,L as n,w as o,F as p,k as q,V as r,R as s,x as t,M as u,N as v,E as w,U as x,j as y,H as z,W as A,J as B,$ as C,Q as D,z as E,K as F,Y as G,Z as H,q as I,X as J,_ as K,tt as L,et as M,at as N,rt as O};
|
|
1
|
+
import{a as m}from"./chunk-ZZGSAFGO.js";import{db as u,ed as l,gd as p,ka as y,lb as I,nb as s,xd as A}from"./chunk-UXRO4UFY.js";var g=class a{transform(e){return e.map(t=>t.UnitPrice).reduce((t,r)=>Math.max(t,r),0)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"highestPrice",type:a,pure:!0,standalone:!1})},S=class a{transform(e){return e.map(t=>t.UnitPrice).reduce((t,r)=>Math.min(t,r),0)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"lowestPrice",type:a,pure:!0,standalone:!1})},C=class a{transform(e,t){let r=e.filter(i=>i.Key==t);return r.length==0?0:r[0].Value}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"groupStock",type:a,pure:!0,standalone:!1})},G=class a{transform(e){return e!=null?e.replace(/\n/g,"<br />"):e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"images",type:a,pure:!0,standalone:!1})};var D=class a{transform(e){var t=new Date(e),r=new Date,i=r.valueOf()-t.valueOf(),n=Math.floor(i%864e5/36e5),o=Math.round(i%864e5%36e5/6e4);return n>0?o+n*60:o}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"durationTime",type:a,pure:!0,standalone:!1})},v=class a{transform(e){let r="",i=e<1440?null:(e-e%1440)/1440;i&&(r=`${i} Day`,i>1&&(r=r+"s"));let n=(e%1440-e%1440%60)/60;n&&(r=r+` ${n} Hour`,n>1&&(r=r+"s"));let o=e%60;return o&&(r=r+` ${o} Minute`,o>1&&(r=r+"s")),r.trim()}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"durationDaysHour",type:a,pure:!0,standalone:!1})},f=class a{transform(e,t,r,i){let n=0;return e&&!r&&!i&&e.forEach(o=>n+=o[t]-0),r&&i&&e.forEach(o=>{o[r]==i&&(n+=o[t]-0)}),n}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sum",type:a,pure:!1,standalone:!1})},O=class a{transform(e,t,r){let i=0;return e&&e.forEach(n=>i+=n[t][r]),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumArray",type:a,pure:!1,standalone:!1})},b=class a{transform(e,t,r,i){let n=0;return e&&e.forEach(o=>{m.IsNotEmpty(o[t][r])&&(n+=o[t][r][i])}),n}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumNestedArray",type:a,pure:!1,standalone:!1})},T=class a{transform(e,t,r,i,n){let o=0;return e&&e.forEach(c=>{let d=c[t].find(it=>it[i]===r);d!==void 0&&(o+=d[n])}),o}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumWithID",type:a,pure:!1,standalone:!1})},B=class a{transform(e,t,r){let i=0;return e&&e.forEach(n=>i+=n[t]*n[r]),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sumMultiply",type:a,pure:!1,standalone:!1})},h=class a{transform(e,t,r){let i=0;return e&&e.forEach(n=>i+=n[t][r]-0),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"SumWithIndex",type:a,pure:!1,standalone:!1})},P=class a{transform(e=[],t){let r=JSON.parse(JSON.stringify(e));if(r.length>0){r=r.sort((n,o)=>n[t]-o[t]);let i=r[0][t];if(r.length>1){let n=r[r.length-1][t];return i===n?i.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"):i.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")+" - "+n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}else return i.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}else return"-"}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"MinToMax",type:a,pure:!0,standalone:!1})},L=class a{transform(e,t,r=0){if(!e)return e;let i=t?parseInt(t,10):10;return e.length>i?e.substring(r,i)+"...":e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"limitTo",type:a,pure:!0,standalone:!1})};var w=class a{transform(e){return e!=null?e.replace(/\n/g,"<br />"):e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"newlines",type:a,pure:!0,standalone:!1})};var F=class a{transform(e,t,r){t=t??2;let i=Math.pow(10,t);return r&&(e=e-e*i%5/i),Math.round(e*i)/i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"DecimalRound",type:a,pure:!0,standalone:!1})},k=class a{constructor(e){this.decimalPipe=e}transform(e,t){if(t=m.IsNotEmpty(t)?t:0,e=m.IsNotEmpty(e)?e:0,!e)return;typeof e=="string"&&(e=e.split(",").join(""),e=parseFloat(e));let r=e?.toFixed(4);for(r=r.substr(r.length-4);r.substr(r.length-1,1)=="0";)r=r.substr(0,r.length-1);let i=r.length>t?r.length:t,n="1."+i.toString()+"-"+i.toString();return this.decimalPipe.transform(e,n)}static \u0275fac=function(t){return new(t||a)(u(p,16))};static \u0275pipe=s({name:"TrailingZero",type:a,pure:!0,standalone:!1})};var V=class a{transform(e,t,r){let i=e.find(n=>n[t]==r);return i??{}}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"find",type:a,pure:!0,standalone:!1})},R=class a{transform(e,t){return e==""||e==null?"":(t==""||t==null||(t=t.replace("{0}",e)),t)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"showIfNotNullOrEmptyString",type:a,pure:!0,standalone:!1})};var x=class a{transform(e,t){return t===void 0||t===""?e:e.filter(r=>r.Name.toLowerCase().indexOf(t.toLowerCase())!==-1)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"FilterByName",type:a,pure:!0,standalone:!1})};var M=class a{transform(e,t,r="Name"){return t===void 0?e:typeof t=="number"?e.filter(i=>i[r]==t):e.filter(i=>i[r].toString().toLowerCase().indexOf(t.toLowerCase())!==-1)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"Filter",type:a,pure:!0,standalone:!1})},N=class a{transform(e,t,r){let i=[];return i=e.filter(n=>n[t]<r),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"GetArrayWithSmallerCondition",type:a,pure:!0,standalone:!1})},E=class a{transform(e,t,r){let i=[];return i=e.filter(n=>n[t]>r),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"GetArrayWithGreaterCondition",type:a,pure:!0,standalone:!1})},U=class a{transform(e,t,r){if(e){if(r==""||r==null||r==null)return e;{let i=[];for(let n=0;n<t.length;n++){let o=e.filter(c=>c[t[n]]!=null);o=o.filter(c=>c[t[n]].toLowerCase().indexOf(r.toLowerCase())>-1),i=i.concat(o)}return i}}else return[]}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"FilterByArray",type:a,pure:!0,standalone:!1})},j=class a{constructor(e){this.sanitizer=e}transform(e){return this.sanitizer.bypassSecurityTrustHtml(e)}static \u0275fac=function(t){return new(t||a)(u(A,16))};static \u0275pipe=s({name:"SafeHtml",type:a,pure:!0,standalone:!1})},H=class a{transform(e){return Math.ceil(e)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"RoundUp",type:a,pure:!0,standalone:!1})},W=class a{transform(e){let t;switch(e){case 1:t="January";break;case 2:t="February";break;case 3:t="March";break;case 4:t="April";break;case 5:t="May";break;case 6:t="June";break;case 7:t="July";break;case 8:t="August";break;case 9:t="September";break;case 10:t="October";break;case 11:t="November";break;case 12:t="December";break;default:t="-"}return t}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"Month",type:a,pure:!0,standalone:!1})},J=class a{transform(e,t){let r=[];return e.forEach(i=>{i[t].forEach(n=>{r.push(n)})}),r}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"GetChildrenArray",type:a,pure:!0,standalone:!1})},$=class a{transform(e,t){let r=0;return e.forEach(i=>{i!=0&&(r+=i[t]?i[t]:0)}),r>0}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"HideSumZero",type:a,pure:!0,standalone:!1})},Q=class a{transform(e,t){var r=new Date(e),i=new Date(t),n=i.getTime()-r.getTime();return Math.round(n/6e4)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"DateDiffInMinute",type:a,pure:!0,standalone:!1})},z=class a{transform(e){return new Date(e)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"ToDateString",type:a,pure:!0,standalone:!1})},K=class a{transform(e,t="",r=""){return!e||t===""||!t||e.length<=1?e:!r||r===""?t==="asc"?e.sort():e.sort().reverse():(e=e.sort((i,n)=>{let o=t==="asc";switch(typeof i[r]){case"string":return this.compare(i[r]?.toLocaleLowerCase(),n[r]?.toLocaleLowerCase(),o);case"number":return this.compare(i[r],n[r],o);default:return 0}}),e)}compare(e,t,r){return(e<t?-1:1)*(r?1:-1)}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"sortBy",type:a,pure:!0,standalone:!1})},Y=class a{constructor(e){this.datePipe=e}transform(e,t){return t=t||"dd/MM/yyyy",e&&e!="0001-01-01T00:00:00"?this.datePipe.transform(e,t):"-"}static \u0275fac=function(t){return new(t||a)(u(l,16))};static \u0275pipe=s({name:"IsMinDate",type:a,pure:!0,standalone:!1})};var Z=class a{transform(e,t){let r=!0;try{let i="";return t=t||"Name",e.forEach((n,o)=>{o==0?i=n[t]:i!=n[t]&&(r=!1)}),r}catch{return!0}}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"checkPropValueIsSame",type:a,pure:!0,standalone:!1})},q=class a{transform(e,t,r,i){let n=e.filter(o=>o[t]==r);return n.length>0?n[0][i]:0}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"FilterGetAmount",type:a,pure:!0,standalone:!1})},X=class a{transform(e){return e?"Yes":"No"}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"YesNo",type:a,pure:!0,standalone:!1})};var _=class a{transform(e,t,r){let i=t.Sales/100*e[0].Rate;return r==1&&(i=t.Tax-i),i}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"TaxDefault",type:a,pure:!0,standalone:!1})},tt=class a{transform(e,t,r){let i=e.toLowerCase(),n;return n=i.replace(t,`<b class="${r}">${t}</b>`),n}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"SearchNote",type:a,pure:!0,standalone:!1})},et=class a{transform(e,t=30){return e.length>t?e.substring(0,t)+"...":e}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=s({name:"TruncateText",type:a,pure:!0,standalone:!1})},at=class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=I({type:a});static \u0275inj=y({providers:[p,f,l,P]})};var rt=class{static GetPOSStorage="/API/POS/LoadPOS";static GetPOSDataByID="/API/POS/GetPOSDataBySalesOrderID";static GetRegisterInfo="/API/POS/GetRegisterInfoByID";static GenerateNumber="/API/POS/GenerateNumber";static RefreshToken="/API/Authentication/RefreshToken";static RemovePark="/API/POS/RemovePark";static VoidPark="/API/POS/VoidPark";static ReturInvoice="/API/POS/ReturInvoiceByEntityIDAndNumber";static MergePark="/API/POS/MergePark";static ParkOrder="/API/POS/SubmitParkOrder";static GetPark="/API/POS/GetParkByEntityID";static GetOutStanding="/API/POS/GetOutStandingByEntityID";static GetVacant="/API/POS/GetParkInfoByEntityID";static RecordOpeningCash="/API/POS/RecordOpeningCash";static OpenRegister="/API/POS/LoadRegister";static SplitOrder="/API/POS/split_parkedorder";static GetPackageID="/API/POS/GetPackageID";static SubmitOrder="/API/POS/SubmitInvoice";static SyncProducts="/API/POSSync/Products";static SyncCustomer="/API/POSSync/Customers";static SynOutletPrice="/API/POSSync/OutletPrices";static SynOutlet="/API/POSSync/Outlets";static SyncPark="/API/POSSync/Parks";static GetRewardByPromotionID="/API/POS/GetRewardByPromotionID";static GetListPromotion="/API/POS/Promotion";static EnabledPromotion="/API/Promotion/UpdateEnabled";static PromotionPushToPOS="/API/promotion/PushToPOS";static GetCustomerSuggestionCode="/API/POS/GetSuggestionCustomerCode";static GetCustomerPrivilegeByID="/API/Contact/GetPrivilegeByCustomerID";static GetCustomerSalesHistory="/API/Contact/GetCustomerSalesHistory";static GetSalesPersonByOutletId="/API/Contact/salesperson/GetSalesPersonByEntityID";static GetVariantByID="/API/catalog/variant/GetVariantByID";static GetVariantByCode="/API/catalog/variant/GetVariantByCode";static GetVariantSuggestionsByEntityID="/API/AC/GetVariantSuggestionByCodeNNameWithEntityID";static GetVariantSuggestions="/API/AC/GetVariantSuggestionByCodeNName";static GetCustomerSuggestions="/API/AC/GetCustomerSuggestion";static BuyReturInvoice="/API/Buy/GetSupplierInvoiceRetur";static GetVariantFormModelByID="/API/catalog/variant/GetVariantFormModelById";static GetVariantWithSameProductID="/API/catalog/variant/GetVariantWithSameProductID";static GetVariantInfoModelById="/API/catalog/variant/GetVariantInfoModelById";static GetTransactionHistoryByVariantId="/API/catalog/variant/GetHistoryByVariantID";static GetStockLogConsistency="/API/Inventory/GetStockLogConsistency";static GetStockLogConsistencyByDate="/API/Inventory/GetStockLogConsistencyByDate";static RefreshAllocatedInventoryCache="/API/Catalog/Variant/RefreshAllocatedByListID";static EraseOutletPrice="/api/catalog/product/DeleteAllOutletPrice";static GetOutletPriceCount="/API/catalog/product/OutletPriceCount";static UpdateROP="/API/Inventory/UpdateROP";static UpdateProductImage="/API/catalog/product/UpdateProductImageUrl";static GetSalesHistory="/Api/catalog/product/GetSalesHistory";static GetPurchaseHistory="/API/catalog/product/GetPurchaseHistory";static GetParkedHistory="/API/catalog/product/GetParkOrder";static ImportProduct="/api/catalog/product/ConfirmImport";static PreviewImportProduct="/api/catalog/product/PreviewUpload";static importOutlet="/API/Outlet/ConfirmImport";static previewImportOutlet="/API/Outlet/PreviewUpload";static MergeProduct="/API/catalog/product/MergeProduct";static CreateVariant="/API/catalog/variant/CreateVariant";static SendInvoiceEmail="/API/Transaction/SendEmail";static SendInvoiceWhatsapp="/API/receipt/Whatsapp";static GetCustomerByCode="/API/Contact/GetByCode";static GetCustomerCode="/API/Contact/GetCode";static GetCustomerEmailByID="/API/Contact/GetEmailByID";static MergeCustomer="/API/Contact/MergeCustomer";static CreateCustomer="/API/Contact/Customer/Create";static CreateCustomerInvoice="/API/POS/AddCustomerByInvoice";static MergeCurrency="/api/Setup/Payment/MergeCurrency";static GetPriceBookByVariantID="/API/catalog/variant/GetPriceBookByVariantID";static ValidateInternalCoupon="/API/PromotionCoupon/ValidateCouponInternal";static validateExternalCoupon="/API/PromotionCoupon/ValidateCouponExternal";static GetCouponData="/API/PromotionCoupon/GetCouponDataAsync";static Invoice="/api/Invoice/InvoiceInfo";static OrdersLoader="/API/OrdersLoader/CustomerInvoice";static Orders="/api/Invoice/CustomerInvoice";static PaymentReceivedLoader="/API/PaymentLoader/DailyPaymentLoader";static PaymentReceived="/API/Payment/DailyPaymentReceived";static CheckOutUrlBuy="/API/Buy/SubmitOrder";static Scanner="/API/AdjustmentLoader/StockTakeByCSV";static AdjustmentLoader="/API/AdjustmentLoader/GetInventoryAdjustmentList";static Adjustment="/API/Adjustment/GetInventoryAdjustmentList";static AdjustmentStorage="/API/Adjustment/GetStorage";static AdjusmentSubmitReview="/API/Adjustment/UpdateToReview";static GetNumberAdjustment="/API/Adjustment/GenerateNumber";static MergeAdjustment="/api/Adjustment/Merge";static GetAccountReceivableLoader="/API/DebtLoader/AccountsReceiveableSummary";static GetAccountReceivableDetailLoader="/API/DebtLoader/AccountsReceiveableDetails";static GetAccountReceivableSummary="/API/Debt/AccountsReceiveableSummary";static getAccountreceivableDetail="/API/Debt/AccountsReceiveableDetails";static BatchCollectionDelete="/API/Debt/InvoiceBatchCollectionDelete";static VoidInvoiceLoader="/API/OrdersLoader/VoidInvoiceLoader";static VoidInvoiceList="/api/RecycleBin/VoidListInvoice";static WaitingPatientList="/API/Treatment/WaitingPatientList";static CheckOutTreatmentByListID="/API/Treatment/CheckOutByListID";static TreatmentRegisterLoader="/API/TreatmentLoader/Registration";static TreatmentRegisterOutletInfo="/API/Treatment/RegistrationGetOutletInfoByEntityID";static TreatmentCustomerInfo="/API/Treatment/RegistrationGetCustomerInfoByCustomerID";static DeleteTreatmentPackageHistory="/API/Treatment/DeleteTreatmentPackageHistoryByID";static DeleteTreatmentArchive="/API/Treatment/DeleteTreatmentArchive";static SubmitTreatementRegistration="/API/Treatment/RegistrationSubmit";static SalesOrderMini="/API/Print/SalesOrderMini";static GetBulkPrint="/API/Tool/getBulkPrint";static GetBulkPrintA4="/API/tool/GetBulkPrintA4";static ProductLoader="/API/catalog/ProductLoader/ProductList";static ProductList="/API/catalog/product/GetProductList";static GetProductByID="/API/catalog/product/GetProductByID";static GetProductByCode="/API/v3/product/Code";static GetAllProductByCategory="/API/catalog/category/GetAllProductByCategory";static DeleteProductList="/API/catalog/product/DeleteProductList";static DeleteVariantInfo="/API/catalog/variant/DeleteVariantInfo";static ProductForm="/API/catalog/ProductLoader/ProductForm";static SubmitProduct="/API/catalog/product/SubmitProduct";static ProductInfo="/API/catalog/ProductLoader/ProductInfoInitial";static ProductCodeByCategory="/api/catalog/product/GetSuggestionProductCodeByCategoryID";static CreateCategory="/API/catalog/category/CreateProductCategory";static CreateBrand="/API/catalog/product/CreateBrand";static CreateTag="/API/catalog/product/CreateTags";static CreateUOM="/API/catalog/product/CreateProductUOM";static VariantInfo="/API/catalog/variant/GetVariantInfoModelById";static VariantFormData="/API/catalog/variant/GetVariantFormInitialData";static VariantForm="/API/catalog/variant/GetVariantFormModelById";static SubmitVariant="/API/catalog/variant/SubmitVariant";static GetVariantOnSelectedIDByID="/API/ProductSetup/GetVariantOnSelectedIDByID";static CreateContact="/API/Contact/Create";static Closure="/API/POS/Closure";static UploadCsv="/API/POS/UploadCsvV2";static GenerateGopayQrCode="/API/Gopay/GenerateQR";static GopayVerifyPayment="/API/Gopay/VerifyQR";static GenerateBcaQrCode="/API/BCA/GenerateQR";static BcaVerifyPayment="/API/BCA/VerifyQR";static InvoiceA4="/API/Print/Invoice";static InvoiceMini="/API/Print/InvoiceMini";static BulkInvoice="/API/Print/BulkInvoice";static BulkSupplierInvoice="/API/Print/BulkSupplierInvoice";static UpdateLastPrintDateTime="/API/Invoice/UpdateLastPrint";static UpdateLastPrintByListID="/API/Invoice/UpdateLastPrintByListID";static UpdateLastPrintDateJoinInvoice="/API/Print/UpdateLastPrintJoinInvoice";static CustomerPoInvoice="/API/Print/CustomerPOInvoice";static InDeliveryInvoice="/API/Print/InDelivery";static InvoiceAndDelivery="/API/Print/InvoiceAndDelivery";static EstimateInvoice="/API/Print/EstimateInvoice";static JobOrderInvoice="/API/Print/JobOrders";static JobOrderMiniInvoice="/API/Print/JobOrderMini";static InvoiceJournal="/Api/Print/Journal";static ClouserReceipt="/API/Print/RegisterClosure";static OutDeliveryInvoice="/Api/Print/OutDelivery";static PackingSlipInvoice="/Api/Print/PrintPackingSlip";static PaymentReceipt="/API/Print/Payment";static AdjustmentInvoice="/API/Print/Adjustment";static SalesOrderReceiptMini="/Api/Print/SalesOrderMini";static WorkOrderReceipt="/Api/Print/WorkOrder";static TransferOrderReceipt="/API/Print/Transfer";static TreatmentInvoice="/API/Print/TreatmentInvoice";static SupplierInvoiceReceipt="/API/Print/SupplierInvoice";static SupplierPoReceipt="/API/Print/SupplierPONG";static UploadCsvBuy="/API/Buy/UploadCsv";static InvoiceInfo="/API/Invoice/InvoiceInfo";static GenerateLink="/API/PayNow/GenerateLink";static LoadFormBuy="/API/Buy2/Load";static BuyGetOutletInfo="/API/Buy2/GetOutletInfo";static BuyGenerateNumber="/API/Buy/GenerateNumber";static BuyGetDataByID="/API/Buy2/GetDataByID";static GetQuickKeyByEntityID="/API/catalog/product/GetQuickKeyByEntityID";static GetVariantStockByID="/API/catalog/variant/GetInventoryByVariantID";static GetSupplierInvoice="/API/Buy/GetSupplierInvoiceRetur";static GetSupplierDTO="/API/Contact/GetSupplierDTO";static UpdateSalesSupplierByID="/API/Buy/UpdateSalesSupplierById";static MergeSupplier="/API/Contact/MergeSupplier";static LoadFormDelivery="/API/TransferOrderLoader/LoadForm";static DeliveryGenerateNumber="/API/TransferOrder/GenerateNumber";static UpdateCourierList="/API/TransferOrder/UpdateCourierList";static SubmitOutletDelivery="/API/TransferOrder/SubmitOrder";static getAllOutletInventory="/API/TransferOrder/ClearOutlet";static GetCourierByOutletDestination="/API/TransferOrder/GetCourierByOutletDestination";static GetCourierInfo="/API/TransferOrderLoader/Info";static UpdateCourier="/API/TransferOrder/UpdateCourierList";static PaymentListSorting="/API/Setup/Payment/SortPaymentMethod";static TaxListSorting="/API/Setup/Payment/SortTax";static SaveTaxSetup="/api/Setup/Payment/SubmitTaxForm";static LoadFormEstimate="/API/Estimate/LoadForm";static EstimateGenerateNumber="/API/Estimate/GenerateNumber";static SubmitEstimate="/API/Estimate/SubmitOrder";static LoadFormAdjustment="/API/Adjustment/LoadForm";static AdjustmentGenerateNumber="/API/Adjustment/GenerateNumber";static SubmitAdjustment="/API/Adjustment/SubmitOrder";static ForecastData="Inventory/Daystozero";static ForecastLoader="InventoryLoader/Daystozero";static ValidateInventory="/api/inventory/GetByListGuidFromCart";static UsageActivities="Developer/DeveloperSpace/API/Activity";static WebhookCouponProviderLoader="Developer/DeveloperSpace/WebhookLoader/WebhookCouponProvider";static WebhookCouponProviderSave="/api/Developer/DeveloperSpace/Webhook/SaveWebhookCouponProvider";static GetVariantSerialPagedLoader="Catalog/SerialLoader/GetVariantSerialPagedLoader";static GetVariantSerialPagination="Catalog/Serial/GetVariantSerialPagination";static SerialInfo="Catalog/Serial/SerialInfo";static GetVariantSerialFormLoader="/api/Catalog/SerialLoader/GetVariantSerialFormLoader";static GetCountVariantSerial="/api/Catalog/Serial/GetCountVariantSerial";static AddVariantSerial="/api/Catalog/Serial/AddVariantSerial";static EditSerial="/api/Catalog/Serial/EditSerial";static GetVariantSerialByListVariantID="/api/Catalog/Serial/GetVariantSerialByListVariantID";static StockAvailableSerial="/api/Catalog/Serial/StockAvailableSerial";static GetVariantSerialByVariantID="/api/Catalog/Serial/GetVariantSerialByVariantID";static GetVariantSerial="/api/Catalog/Serial/GetVariantSerial";static GetVariantBySerial="/api/catalog/serial/GetVariantbySerial";static GetSerialHistory="/api/catalog/serial/History";static GetDashboardSales="/API/Dashboard/Sales";static GetDashboardPayment="/API/Payment/DailyPaymentRecevedHighChart";static GetDashboardPurchase="/API/Dashboard/Purchase";static GetDashboardDebt="/API/Dashboard/Debt";static GetDashboardProduct="/API/Dashboard/Product";static GetDashboardInventory="/API/Dashboard/Inventory";static DeleteListPayment="/api/Payment/DeleteListPayment";static RevokeAccess="/api/user/user/RevokeAccess";static RevokeAccessGroup="/api/user/group/RevokedUsers";static GroupHistoryLoader="/api/user/GroupLoader/UpdateHistory";static GroupHistoryData="/api/user/Group/UpdateHistory";static GetUnfulfilledOrderByNumberOrReferenceNumber="/api/OutboundLogisticsLoader/GetOutboundInfo";static GetUnfulfilledNumberByNumber="/API/AC/SearchUnfulfilledOrderByNumber";static SendTransferOrder="/api/TransferOrder/SendTransferOrder";static ReceiveTransferOrder="/api/TransferOrder/ReceiveTransferOrder";static ApproveDelivery="/api/TransferOrder/ApproveTransferOrder";static GetUUID="/api/setup/getuuidv7"};export{g as a,S as b,C as c,G as d,D as e,v as f,f as g,O as h,b as i,T as j,B as k,h as l,P as m,L as n,w as o,F as p,k as q,V as r,R as s,x as t,M as u,N as v,E as w,U as x,j as y,H as z,W as A,J as B,$ as C,Q as D,z as E,K as F,Y as G,Z as H,q as I,X as J,_ as K,tt as L,et as M,at as N,rt as O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as xe}from"./chunk-4SKJU2FQ.js";import{d as we,e as Se}from"./chunk-IC3DZAMU.js";import{B as V,D as L,u as he,v as Me,w as ye}from"./chunk-EFDAS2KA.js";import{N as ve,O as G}from"./chunk-46DETXA6.js";import{d as R}from"./chunk-XYB3YDKL.js";import{e as _e,f as be}from"./chunk-3YKVLHZG.js";import{A as pe,B as ue,F as ge,G as Ce,c as oe,h as re,i as ae,k as le,o as de,p as se,x as ce,y as me}from"./chunk-RVXZOIFQ.js";import{a as ie}from"./chunk-ZZGSAFGO.js";import{$ as K,$a as a,A as k,D as U,Db as y,Ib as d,Jb as l,Kb as Y,Ma as J,Ob as v,Qb as D,Rb as g,Vb as B,Vd as ne,Wc as Z,Yc as $,Yd as fe,Zc as ee,db as P,dc as h,e as j,ec as m,gc as x,ja as E,jc as C,jd as te,ka as z,kb as Q,kc as f,lb as X,lc as _,ma as S,q as A,qb as b,rc as M,t as w,u as H,va as p,vb as c,wa as u}from"./chunk-UXRO4UFY.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(ne))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new xe;addCustomer(n){let e=[];n.Group&&e.push(n.Group);let t={contact:n,groups:e};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",t)).catch(r=>Promise.reject(r))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(G.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(G.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(fe),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Pe=i=>({"border border-danger":i}),O=i=>({"is-invalid":i}),Ve=i=>({"is-invalid border border-danger":i}),Le=i=>({"has-error":i});function Fe(i,n){if(i&1){let e=v();d(0,"a",12),D("click",function(){p(e);let r=g();return u(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",M(1,T,e.tabState=="id"))}}function We(i,n){if(i&1&&Y(0,"option",48),i&2){let e=n.$implicit;c("value",e.Name)}}function ke(i,n){if(i&1&&(d(0,"div",49)(1,"i",50),m(2," Name is mandatory."),l()()),i&2){g();let e=h(25);c("ngClass",M(1,Le,e.touched&&e.invalid))}}function Be(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function Re(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=h(37);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&b(0,Be,2,0,"div",40)(1,Re,2,1,"div",40),i&2){g();let e=h(37);y(e.getError("required")&&!e.getError("minLength")?0:-1),a(),y(e.getError("minLength")?1:-1)}}function qe(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function je(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function Ae(i,n){if(i&1&&b(0,qe,2,0,"div",51)(1,je,2,0,"div",40),i&2){g();let e=h(44);c("ngIf",e.errors==null?null:e.errors.email),a(),y(e.errors!=null&&e.errors.required?1:-1)}}function He(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ue(i,n){if(i&1&&b(0,He,2,0,"div",40),i&2){g();let e=h(3);y(e.invalid?0:-1)}}function Ke(i,n){if(i&1){let e=v();d(0,"div",46)(1,"div",17)(2,"datepicker",52,6),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Birthdate,r)||(s.customer.Birthdate=r),u(r)}),l(),b(4,Ue,1,1),l()()}if(i&2){let e=h(3),t=g();a(2),C("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",M(4,O,e.invalid&&(e.dirty||e.touched))),a(2),y(e.dirty||e.touched?4:-1)}}function ze(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Je(i,n){if(i&1){let e=v();d(0,"div",46)(1,"div",17)(2,"input",53,7),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Code,r)||(s.customer.Code=r),u(r)}),l(),b(4,ze,2,1,"div",40),d(5,"label",54),m(6),l()()()}if(i&2){let e=h(3),t=g();a(2),B("placeholder","",t.type=="supplier"?"Supplier":"Member"," code"),C("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",M(7,O,e.invalid&&(e.dirty||e.touched))),a(2),y(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Xe(i,n){if(i&1){let e=v();d(0,"div",55)(1,"div",17)(2,"input",53,7),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Code,r)||(s.customer.Code=r),u(r)}),l(),b(4,Qe,2,1,"div",40),d(5,"label",54),m(6),l()()()}if(i&2){let e=h(3),t=g();a(2),B("placeholder","",t.type=="supplier"?"Supplier":"Member"," code"),C("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",M(7,O,e.invalid&&(e.dirty||e.touched))),a(2),y(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",55)(1,"div",56)(2,"ng-select",57),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Group,r)||(s.customer.Group=r),u(r)}),l(),d(3,"label",58),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",M(3,T,e.isNotEmpty(e.customer.Group))),a(),C("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function Ze(i,n){if(i&1){let e=v();d(0,"div",55)(1,"div",56)(2,"ng-select",59),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.City,r)||(s.customer.City=r),u(r)}),l(),d(3,"label",60),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",M(3,T,e.isNotEmpty(e.customer.City))),a(),C("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function $e(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function et(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=h(67);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ne=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new he,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new q,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ie.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(_e),P(be),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:80,vars:56,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],["class","btn btn-link",3,"ngClass","click",4,"ngIf"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass",4,"ngIf"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],["class","col-6 mt-4",4,"ngIf"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],["class","col-4 mt-4",4,"ngIf"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"col-6","mt-4"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[3,"value"],[3,"ngClass"],[1,"control-label","text-danger"],["class","invalid-feedback",4,"ngIf"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["for","code"],[1,"col-4","mt-4"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),D("onOk",function(){p(r);let o=h(4);return u(t.onOk(o))})("onCancel",function(){return p(r),u(t.dialogRef.close())})("onClose",function(){return p(r),u(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),D("click",function(){return p(r),u(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),D("click",function(){return p(r),u(t.chooiceDetail("detail"))}),m(10," Detail "),l(),b(11,Fe,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),_("ngModelChange",function(o){return p(r),f(t.customer.Title,o)||(t.customer.Title=o),u(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),b(21,We,1,1,"option",21),l()()(),d(22,"div",22)(23,"div",17)(24,"input",23,1),_("ngModelChange",function(o){return p(r),f(t.customer.FirstName,o)||(t.customer.FirstName=o),u(o)}),l(),b(26,ke,3,3,"div",24),d(27,"label",25),m(28,"First Name"),l()()(),d(29,"div",22)(30,"div",17)(31,"input",26),_("ngModelChange",function(o){return p(r),f(t.customer.LastName,o)||(t.customer.LastName=o),u(o)}),l(),d(32,"label",27),m(33,"Last Name"),l()()(),d(34,"div",28)(35,"div",17)(36,"input",29,2),_("ngModelChange",function(o){return p(r),f(t.customer.Mobile,o)||(t.customer.Mobile=o),u(o)}),l(),b(38,Ge,2,2),d(39,"label",30),m(40,"Mobile"),l()()(),d(41,"div",28)(42,"div",17)(43,"input",31,3),_("ngModelChange",function(o){return p(r),f(t.customer.Email,o)||(t.customer.Email=o),u(o)}),l(),b(45,Ae,2,2),d(46,"label",32),m(47,"Email"),l()()(),b(48,Ke,5,6,"div",33)(49,Je,7,9,"div",33),d(50,"div",28)(51,"ng-select",34),_("ngModelChange",function(o){return p(r),f(t.customer.Gender,o)||(t.customer.Gender=o),u(o)}),l()()(),d(52,"div",35),b(53,Xe,7,9,"div",36)(54,Ye,5,5,"div",36)(55,Ze,5,5,"div",36),d(56,"div",37)(57,"div",17)(58,"textarea",38,4),_("ngModelChange",function(o){return p(r),f(t.customer.Address,o)||(t.customer.Address=o),u(o)}),l(),d(60,"label",39),m(61,"Address"),l(),b(62,$e,2,0,"div",40),l()()(),d(63,"div",35)(64,"div",28)(65,"div",17)(66,"input",41,5),_("ngModelChange",function(o){return p(r),f(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),u(o)}),l(),b(68,et,2,1,"div",40),d(69,"label",42),m(70,"National ID"),l()()(),d(71,"div",28)(72,"div",17)(73,"input",43),_("ngModelChange",function(o){return p(r),f(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),u(o)}),l(),d(74,"label",44),m(75,"Tax ID"),l()()(),d(76,"div",28)(77,"ng-select",45),_("ngModelChange",function(o){return p(r),f(t.customer.NationalityID,o)||(t.customer.NationalityID=o),u(o)}),l()(),d(78,"div",46)(79,"ng-select",47),_("ngModelChange",function(o){return p(r),f(t.customer.RaceID,o)||(t.customer.RaceID=o),u(o)}),l()()()()()()()()()}if(e&2){let r=h(25),s=h(37),o=h(44),I=h(59),N=h(67);c("config",t.modalConfig),a(7),c("ngClass",M(42,T,t.tabState=="general")),a(2),c("ngClass",M(44,T,t.tabState=="detail")),a(2),c("ngIf",t.type!="supplier"),a(3),c("hidden",t.tabState!="general"),a(3),C("ngModel",t.customer.Title),a(4),c("ngForOf",t.options==null?null:t.options.Titles),a(3),c("ngClass",M(46,Pe,r.touched&&r.invalid)),C("ngModel",t.customer.FirstName),c("required",!0),a(2),c("ngIf",r.touched&&r.invalid),a(5),C("ngModel",t.customer.LastName),a(5),C("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",M(48,O,s.invalid&&(s.dirty||s.touched))),a(2),y(s.invalid&&(s.dirty||s.touched)?38:-1),a(5),c("ngClass",M(50,Ve,o.invalid&&(o.dirty||o.touched))),C("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),y(o.invalid&&(o.dirty||o.touched)?45:-1),a(3),c("ngIf",t.type!="supplier"),a(),c("ngIf",t.type=="supplier"),a(2),C("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),c("ngIf",t.type!="supplier"),a(),c("ngIf",t.type!="supplier"),a(),c("ngIf",t.type!="supplier"),a(3),c("rows",t.type!="supplier"?6:9),C("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",M(52,O,I.invalid&&(I.dirty||I.touched))),a(4),y(I.invalid&&(I.dirty||I.touched)?62:-1),a(),c("hidden",t.tabState!="id"),a(3),C("ngModel",t.customer.NationalIDNumber),c("ngClass",M(54,O,N.invalid&&(N.dirty||N.touched))),a(2),y(N.invalid&&(N.dirty||N.touched)?68:-1),a(5),C("ngModel",t.customer.TaxIDNumber),a(4),C("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),C("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[Z,$,ee,Me,se,ce,me,oe,re,ae,pe,ue,de,le,we,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[te,ve,ye,ge,Ce,Se,R]})},q=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ne as c,Oe as d,q as e};
|
|
1
|
+
import{a as xe}from"./chunk-4SKJU2FQ.js";import{d as we,e as Se}from"./chunk-6G37ZXRX.js";import{B as V,D as L,u as he,v as Me,w as ye}from"./chunk-CD3BSGAP.js";import{N as ve,O as G}from"./chunk-5OS5VELO.js";import{d as R}from"./chunk-XYB3YDKL.js";import{e as _e,f as be}from"./chunk-3YKVLHZG.js";import{A as pe,B as ue,F as ge,G as Ce,c as oe,h as re,i as ae,k as le,o as de,p as se,x as ce,y as me}from"./chunk-RVXZOIFQ.js";import{a as ie}from"./chunk-ZZGSAFGO.js";import{$ as K,$a as a,A as k,D as U,Db as y,Ib as d,Jb as l,Kb as Y,Ma as J,Ob as v,Qb as D,Rb as g,Vb as B,Vd as ne,Wc as Z,Yc as $,Yd as fe,Zc as ee,db as P,dc as h,e as j,ec as m,gc as x,ja as E,jc as C,jd as te,ka as z,kb as Q,kc as f,lb as X,lc as _,ma as S,q as A,qb as b,rc as M,t as w,u as H,va as p,vb as c,wa as u}from"./chunk-UXRO4UFY.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(ne))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new xe;addCustomer(n){let e=[];n.Group&&e.push(n.Group);let t={contact:n,groups:e};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",t)).catch(r=>Promise.reject(r))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(G.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(G.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(fe),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Pe=i=>({"border border-danger":i}),O=i=>({"is-invalid":i}),Ve=i=>({"is-invalid border border-danger":i}),Le=i=>({"has-error":i});function Fe(i,n){if(i&1){let e=v();d(0,"a",12),D("click",function(){p(e);let r=g();return u(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",M(1,T,e.tabState=="id"))}}function We(i,n){if(i&1&&Y(0,"option",48),i&2){let e=n.$implicit;c("value",e.Name)}}function ke(i,n){if(i&1&&(d(0,"div",49)(1,"i",50),m(2," Name is mandatory."),l()()),i&2){g();let e=h(25);c("ngClass",M(1,Le,e.touched&&e.invalid))}}function Be(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function Re(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=h(37);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&b(0,Be,2,0,"div",40)(1,Re,2,1,"div",40),i&2){g();let e=h(37);y(e.getError("required")&&!e.getError("minLength")?0:-1),a(),y(e.getError("minLength")?1:-1)}}function qe(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function je(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function Ae(i,n){if(i&1&&b(0,qe,2,0,"div",51)(1,je,2,0,"div",40),i&2){g();let e=h(44);c("ngIf",e.errors==null?null:e.errors.email),a(),y(e.errors!=null&&e.errors.required?1:-1)}}function He(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ue(i,n){if(i&1&&b(0,He,2,0,"div",40),i&2){g();let e=h(3);y(e.invalid?0:-1)}}function Ke(i,n){if(i&1){let e=v();d(0,"div",46)(1,"div",17)(2,"datepicker",52,6),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Birthdate,r)||(s.customer.Birthdate=r),u(r)}),l(),b(4,Ue,1,1),l()()}if(i&2){let e=h(3),t=g();a(2),C("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",M(4,O,e.invalid&&(e.dirty||e.touched))),a(2),y(e.dirty||e.touched?4:-1)}}function ze(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Je(i,n){if(i&1){let e=v();d(0,"div",46)(1,"div",17)(2,"input",53,7),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Code,r)||(s.customer.Code=r),u(r)}),l(),b(4,ze,2,1,"div",40),d(5,"label",54),m(6),l()()()}if(i&2){let e=h(3),t=g();a(2),B("placeholder","",t.type=="supplier"?"Supplier":"Member"," code"),C("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",M(7,O,e.invalid&&(e.dirty||e.touched))),a(2),y(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Xe(i,n){if(i&1){let e=v();d(0,"div",55)(1,"div",17)(2,"input",53,7),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Code,r)||(s.customer.Code=r),u(r)}),l(),b(4,Qe,2,1,"div",40),d(5,"label",54),m(6),l()()()}if(i&2){let e=h(3),t=g();a(2),B("placeholder","",t.type=="supplier"?"Supplier":"Member"," code"),C("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",M(7,O,e.invalid&&(e.dirty||e.touched))),a(2),y(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",55)(1,"div",56)(2,"ng-select",57),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.Group,r)||(s.customer.Group=r),u(r)}),l(),d(3,"label",58),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",M(3,T,e.isNotEmpty(e.customer.Group))),a(),C("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function Ze(i,n){if(i&1){let e=v();d(0,"div",55)(1,"div",56)(2,"ng-select",59),_("ngModelChange",function(r){p(e);let s=g();return f(s.customer.City,r)||(s.customer.City=r),u(r)}),l(),d(3,"label",60),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",M(3,T,e.isNotEmpty(e.customer.City))),a(),C("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function $e(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function et(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=h(67);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ne=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new he,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new q,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ie.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(_e),P(be),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:80,vars:56,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],["class","btn btn-link",3,"ngClass","click",4,"ngIf"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass",4,"ngIf"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],["class","col-6 mt-4",4,"ngIf"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],["class","col-4 mt-4",4,"ngIf"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"col-6","mt-4"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[3,"value"],[3,"ngClass"],[1,"control-label","text-danger"],["class","invalid-feedback",4,"ngIf"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["for","code"],[1,"col-4","mt-4"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),D("onOk",function(){p(r);let o=h(4);return u(t.onOk(o))})("onCancel",function(){return p(r),u(t.dialogRef.close())})("onClose",function(){return p(r),u(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),D("click",function(){return p(r),u(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),D("click",function(){return p(r),u(t.chooiceDetail("detail"))}),m(10," Detail "),l(),b(11,Fe,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),_("ngModelChange",function(o){return p(r),f(t.customer.Title,o)||(t.customer.Title=o),u(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),b(21,We,1,1,"option",21),l()()(),d(22,"div",22)(23,"div",17)(24,"input",23,1),_("ngModelChange",function(o){return p(r),f(t.customer.FirstName,o)||(t.customer.FirstName=o),u(o)}),l(),b(26,ke,3,3,"div",24),d(27,"label",25),m(28,"First Name"),l()()(),d(29,"div",22)(30,"div",17)(31,"input",26),_("ngModelChange",function(o){return p(r),f(t.customer.LastName,o)||(t.customer.LastName=o),u(o)}),l(),d(32,"label",27),m(33,"Last Name"),l()()(),d(34,"div",28)(35,"div",17)(36,"input",29,2),_("ngModelChange",function(o){return p(r),f(t.customer.Mobile,o)||(t.customer.Mobile=o),u(o)}),l(),b(38,Ge,2,2),d(39,"label",30),m(40,"Mobile"),l()()(),d(41,"div",28)(42,"div",17)(43,"input",31,3),_("ngModelChange",function(o){return p(r),f(t.customer.Email,o)||(t.customer.Email=o),u(o)}),l(),b(45,Ae,2,2),d(46,"label",32),m(47,"Email"),l()()(),b(48,Ke,5,6,"div",33)(49,Je,7,9,"div",33),d(50,"div",28)(51,"ng-select",34),_("ngModelChange",function(o){return p(r),f(t.customer.Gender,o)||(t.customer.Gender=o),u(o)}),l()()(),d(52,"div",35),b(53,Xe,7,9,"div",36)(54,Ye,5,5,"div",36)(55,Ze,5,5,"div",36),d(56,"div",37)(57,"div",17)(58,"textarea",38,4),_("ngModelChange",function(o){return p(r),f(t.customer.Address,o)||(t.customer.Address=o),u(o)}),l(),d(60,"label",39),m(61,"Address"),l(),b(62,$e,2,0,"div",40),l()()(),d(63,"div",35)(64,"div",28)(65,"div",17)(66,"input",41,5),_("ngModelChange",function(o){return p(r),f(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),u(o)}),l(),b(68,et,2,1,"div",40),d(69,"label",42),m(70,"National ID"),l()()(),d(71,"div",28)(72,"div",17)(73,"input",43),_("ngModelChange",function(o){return p(r),f(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),u(o)}),l(),d(74,"label",44),m(75,"Tax ID"),l()()(),d(76,"div",28)(77,"ng-select",45),_("ngModelChange",function(o){return p(r),f(t.customer.NationalityID,o)||(t.customer.NationalityID=o),u(o)}),l()(),d(78,"div",46)(79,"ng-select",47),_("ngModelChange",function(o){return p(r),f(t.customer.RaceID,o)||(t.customer.RaceID=o),u(o)}),l()()()()()()()()()}if(e&2){let r=h(25),s=h(37),o=h(44),I=h(59),N=h(67);c("config",t.modalConfig),a(7),c("ngClass",M(42,T,t.tabState=="general")),a(2),c("ngClass",M(44,T,t.tabState=="detail")),a(2),c("ngIf",t.type!="supplier"),a(3),c("hidden",t.tabState!="general"),a(3),C("ngModel",t.customer.Title),a(4),c("ngForOf",t.options==null?null:t.options.Titles),a(3),c("ngClass",M(46,Pe,r.touched&&r.invalid)),C("ngModel",t.customer.FirstName),c("required",!0),a(2),c("ngIf",r.touched&&r.invalid),a(5),C("ngModel",t.customer.LastName),a(5),C("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",M(48,O,s.invalid&&(s.dirty||s.touched))),a(2),y(s.invalid&&(s.dirty||s.touched)?38:-1),a(5),c("ngClass",M(50,Ve,o.invalid&&(o.dirty||o.touched))),C("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),y(o.invalid&&(o.dirty||o.touched)?45:-1),a(3),c("ngIf",t.type!="supplier"),a(),c("ngIf",t.type=="supplier"),a(2),C("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),c("ngIf",t.type!="supplier"),a(),c("ngIf",t.type!="supplier"),a(),c("ngIf",t.type!="supplier"),a(3),c("rows",t.type!="supplier"?6:9),C("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",M(52,O,I.invalid&&(I.dirty||I.touched))),a(4),y(I.invalid&&(I.dirty||I.touched)?62:-1),a(),c("hidden",t.tabState!="id"),a(3),C("ngModel",t.customer.NationalIDNumber),c("ngClass",M(54,O,N.invalid&&(N.dirty||N.touched))),a(2),y(N.invalid&&(N.dirty||N.touched)?68:-1),a(5),C("ngModel",t.customer.TaxIDNumber),a(4),C("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),C("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[Z,$,ee,Me,se,ce,me,oe,re,ae,pe,ue,de,le,we,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[te,ve,ye,ge,Ce,Se,R]})},q=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ne as c,Oe as d,q as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ut}from"./chunk-YEDKRNXU.js";import{b as it,c as rt,d as Qt}from"./chunk-T2IJ4MCB.js";import{a as Zt,b as Xt}from"./chunk-7QWJJPNG.js";import{a as Gt,k as $t,l as nt}from"./chunk-EFDAS2KA.js";import{F as $,K as Lt,M as tt,N as Bt,R as at,S as Ht,T as zt,W as Kt,_ as Le,ba as Wt,d as Je,da as jt,ea as qt,f as L,g as Yt,m as et,n as pe,o as Ne,v as Pt,x as Nt,y as ue,z as W}from"./chunk-ZHY3BUQJ.js";import{a as Ye,d as Pe,e as he,f as Tt,g as Ft,k as Rt,t as Ot}from"./chunk-RVXZOIFQ.js";import{$ as Ce,$a as l,$b as k,Ba as Se,Ca as At,D as ne,Db as de,E as Ct,Fa as p,Ga as qe,Gb as Ie,Hb as xe,Ib as d,Ic as Vt,Jb as c,Ka as z,Kb as I,Kc as T,Ma as Ge,Mc as R,N as wt,Ob as le,Pb as Te,Qa as Mt,Qb as g,Rb as u,Sb as ce,Sc as It,Ta as Qe,Tb as Q,Wc as xt,Yb as Et,Zb as x,_b as M,a as A,ab as kt,cb as Ue,d as S,eb as St,ec as D,fb as $e,fc as F,gc as U,hc as Xe,ia as We,ja as O,jc as Fe,ka as we,kb as C,kc as Re,la as G,lb as Ee,lc as Oe,ma as Ae,mb as E,na as o,o as ve,ob as K,pa as Me,pc as N,qa as ke,qb as P,ua as Y,ub as b,va as y,vb as _,wa as v,wb as Ve,xa as se,xb as V,ya as je,za as oe,zb as Ze}from"./chunk-UXRO4UFY.js";import{a as yt,b as vt}from"./chunk-7DCB7DB2.js";var st=new G("MAT_DATE_LOCALE",{providedIn:"root",factory:Da});function Da(){return o(Vt)}var Z="Method not implemented",m=class{locale;_localeChanges=new S;localeChanges=this._localeChanges;setTime(s,e,a,t){throw new Error(Z)}getHours(s){throw new Error(Z)}getMinutes(s){throw new Error(Z)}getSeconds(s){throw new Error(Z)}parseTime(s,e){throw new Error(Z)}addSeconds(s,e){throw new Error(Z)}getValidDateOrNull(s){return this.isDateInstance(s)&&this.isValid(s)?s:null}deserialize(s){return s==null||this.isDateInstance(s)&&this.isValid(s)?s:this.invalid()}setLocale(s){this.locale=s,this._localeChanges.next()}compareDate(s,e){return this.getYear(s)-this.getYear(e)||this.getMonth(s)-this.getMonth(e)||this.getDate(s)-this.getDate(e)}compareTime(s,e){return this.getHours(s)-this.getHours(e)||this.getMinutes(s)-this.getMinutes(e)||this.getSeconds(s)-this.getSeconds(e)}sameDate(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareDate(s,e):a==t}return s==e}sameTime(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareTime(s,e):a==t}return s==e}clampDate(s,e,a){return e&&this.compareDate(s,e)<0?e:a&&this.compareDate(s,a)>0?a:s}},B=new G("mat-date-formats");var va=["mat-calendar-body",""];function Ca(i,s){return this._trackRow(s)}var sa=(i,s)=>s.id;function wa(i,s){if(i&1&&(d(0,"tr",0)(1,"td",3),D(2),c()()),i&2){let e=u();l(),Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e.numCols),l(),U(" ",e.label," ")}}function Aa(i,s){if(i&1&&(d(0,"td",3),D(1),c()),i&2){let e=u(2);Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e._firstRowOffset),l(),U(" ",e._firstRowOffset>=e.labelMinRequiredCells?e.label:""," ")}}function Ma(i,s){if(i&1){let e=le();d(0,"td",6)(1,"button",7),g("click",function(t){let r=y(e).$implicit,n=u(2);return v(n._cellClicked(r,t))})("focus",function(t){let r=y(e).$implicit,n=u(2);return v(n._emitActiveDateChange(r,t))}),d(2,"span",8),D(3),c(),I(4,"span",9),c()()}if(i&2){let e=s.$implicit,a=s.$index,t=u().$index,r=u();Ve("width",r._cellWidth)("padding-top",r._cellPadding)("padding-bottom",r._cellPadding),b("data-mat-row",t)("data-mat-col",a),l(),V("mat-calendar-body-disabled",!e.enabled)("mat-calendar-body-active",r._isActiveCell(t,a))("mat-calendar-body-range-start",r._isRangeStart(e.compareValue))("mat-calendar-body-range-end",r._isRangeEnd(e.compareValue))("mat-calendar-body-in-range",r._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start",r._isComparisonBridgeStart(e.compareValue,t,a))("mat-calendar-body-comparison-bridge-end",r._isComparisonBridgeEnd(e.compareValue,t,a))("mat-calendar-body-comparison-start",r._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end",r._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range",r._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start",r._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end",r._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview",r._isInPreview(e.compareValue)),_("ngClass",e.cssClasses)("tabindex",r._isActiveCell(t,a)?0:-1),b("aria-label",e.ariaLabel)("aria-disabled",!e.enabled||null)("aria-pressed",r._isSelected(e.compareValue))("aria-current",r.todayValue===e.compareValue?"date":null)("aria-describedby",r._getDescribedby(e.compareValue)),l(),V("mat-calendar-body-selected",r._isSelected(e.compareValue))("mat-calendar-body-comparison-identical",r._isComparisonIdentical(e.compareValue))("mat-calendar-body-today",r.todayValue===e.compareValue),l(),U(" ",e.displayValue," ")}}function ka(i,s){if(i&1&&(d(0,"tr",1),P(1,Aa,2,6,"td",4),Ie(2,Ma,5,48,"td",5,sa),c()),i&2){let e=s.$implicit,a=s.$index,t=u();l(),de(a===0&&t._firstRowOffset?1:-1),l(),xe(e)}}function Sa(i,s){if(i&1&&(d(0,"th",2)(1,"span",6),D(2),c(),d(3,"span",3),D(4),c()()),i&2){let e=s.$implicit;l(2),F(e.long),l(2),F(e.narrow)}}var oa=["*"];function Ea(i,s){}function Va(i,s){if(i&1){let e=le();d(0,"mat-month-view",4),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("_userSelection",function(t){y(e);let r=u();return v(r._dateSelected(t))})("dragStarted",function(t){y(e);let r=u();return v(r._dragStarted(t))})("dragEnded",function(t){y(e);let r=u();return v(r._dragEnded(t))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("startDateAccessibleName",e.startDateAccessibleName)("endDateAccessibleName",e.endDateAccessibleName)("activeDrag",e._activeDrag)}}function Ia(i,s){if(i&1){let e=le();d(0,"mat-year-view",5),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("monthSelected",function(t){y(e);let r=u();return v(r._monthSelectedInYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"month"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function xa(i,s){if(i&1){let e=le();d(0,"mat-multi-year-view",6),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("yearSelected",function(t){y(e);let r=u();return v(r._yearSelectedInMultiYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"year"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function Ta(i,s){}var Fa=["button"],Ra=[[["","matDatepickerToggleIcon",""]]],Oa=["[matDatepickerToggleIcon]"];function Ya(i,s){i&1&&(se(),d(0,"svg",2),I(1,"path",3),c())}var Pa=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Na=["input[matStartDate]","input[matEndDate]"];function La(i,s){i&1&&(d(0,"div",0),Q(1),c())}var re=(()=>{class i{changes=new S;calendarLabel="Calendar";openCalendarLabel="Open calendar";closeCalendarLabel="Close calendar";prevMonthLabel="Previous month";nextMonthLabel="Next month";prevYearLabel="Previous year";nextYearLabel="Next year";prevMultiYearLabel="Previous 24 years";nextMultiYearLabel="Next 24 years";switchToMonthViewLabel="Choose date";switchToMultiYearViewLabel="Choose month and year";startDateLabel="Start date";endDateLabel="End date";comparisonDateLabel="Comparison range";formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}static \u0275fac=function(a){return new(a||i)};static \u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Ba=0,ge=class{value;displayValue;ariaLabel;enabled;cssClasses;compareValue;rawValue;id=Ba++;constructor(s,e,a,t,r={},n=s,h){this.value=s,this.displayValue=e,this.ariaLabel=a,this.enabled=t,this.cssClasses=r,this.compareValue=n,this.rawValue=h}},Ha={passive:!1,capture:!0},Be={passive:!0,capture:!0},Jt={passive:!0},te=(()=>{class i{_elementRef=o(z);_ngZone=o(qe);_platform=o(Yt);_intl=o(re);_eventCleanups;_skipNextFocus;_focusActiveCellAfterViewChecked=!1;label;rows;todayValue;startValue;endValue;labelMinRequiredCells;numCols=7;activeCell=0;ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}isRange=!1;cellAspectRatio=1;comparisonStart;comparisonEnd;previewStart=null;previewEnd=null;startDateAccessibleName;endDateAccessibleName;selectedValueChange=new p;previewChange=new p;activeDateChange=new p;dragStarted=new p;dragEnded=new p;_firstRowOffset;_cellPadding;_cellWidth;_startDateLabelId;_endDateLabelId;_comparisonStartDateLabelId;_comparisonEndDateLabelId;_didDragSinceMouseDown=!1;_injector=o(Se);comparisonDateAccessibleName=this._intl.comparisonDateLabel;_trackRow=e=>e;constructor(){let e=o(Ue),a=o(ue);this._startDateLabelId=a.getId("mat-calendar-body-start-"),this._endDateLabelId=a.getId("mat-calendar-body-end-"),this._comparisonStartDateLabelId=a.getId("mat-calendar-body-comparison-start-"),this._comparisonEndDateLabelId=a.getId("mat-calendar-body-comparison-end-"),o(pe).load(Gt),this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,r=[L(e,t,"touchmove",this._touchmoveHandler,Ha),L(e,t,"mouseenter",this._enterHandler,Be),L(e,t,"focus",this._enterHandler,Be),L(e,t,"mouseleave",this._leaveHandler,Be),L(e,t,"blur",this._leaveHandler,Be),L(e,t,"mousedown",this._mousedownHandler,Jt),L(e,t,"touchstart",this._mousedownHandler,Jt)];this._platform.isBrowser&&r.push(e.listen("window","mouseup",this._mouseupHandler),e.listen("window","touchend",this._touchendHandler)),this._eventCleanups=r})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:r}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?r-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/r}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/r}%`)}ngOnDestroy(){this._eventCleanups.forEach(e=>e())}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){Qe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return lt(e,this.startValue,this.endValue)}_isRangeEnd(e){return ct(e,this.startValue,this.endValue)}_isInRange(e){return ht(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return lt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let r=this.rows[a][t-1];if(!r){let n=this.rows[a-1];r=n&&n[n.length-1]}return r&&!this._isRangeEnd(r.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let r=this.rows[a][t+1];if(!r){let n=this.rows[a+1];r=n&&n[0]}return r&&!this._isRangeStart(r.compareValue)}_isComparisonEnd(e){return ct(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return ht(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return lt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return ct(e,this.previewStart,this.previewEnd)}_isInPreview(e){return ht(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){if(!this.isRange)return null;if(this.startValue===e&&this.endValue===e)return`${this._startDateLabelId} ${this._endDateLabelId}`;if(this.startValue===e)return this._startDateLabelId;if(this.endValue===e)return this._endDateLabelId;if(this.comparisonStart!==null&&this.comparisonEnd!==null){if(e===this.comparisonStart&&e===this.comparisonEnd)return`${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;if(e===this.comparisonStart)return this._comparisonStartDateLabelId;if(e===this.comparisonEnd)return this._comparisonEndDateLabelId}return null}_enterHandler=e=>{if(this._skipNextFocus&&e.type==="focus"){this._skipNextFocus=!1;return}if(e.target&&this.isRange){let a=this._getCellFromElement(e.target);a&&this._ngZone.run(()=>this.previewChange.emit({value:a.enabled?a:null,event:e}))}};_touchmoveHandler=e=>{if(!this.isRange)return;let a=ea(e),t=a?this._getCellFromElement(a):null;a!==e.target&&(this._didDragSinceMouseDown=!0),dt(e.target)&&e.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:t?.enabled?t:null,event:e}))};_leaveHandler=e=>{this.previewEnd!==null&&this.isRange&&(e.type!=="blur"&&(this._didDragSinceMouseDown=!0),e.target&&this._getCellFromElement(e.target)&&!(e.relatedTarget&&this._getCellFromElement(e.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:e})))};_mousedownHandler=e=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let a=e.target&&this._getCellFromElement(e.target);!a||!this._isInRange(a.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:a.rawValue,event:e})})};_mouseupHandler=e=>{if(!this.isRange)return;let a=dt(e.target);if(!a){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:e})});return}a.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let t=this._getCellFromElement(a);this.dragEnded.emit({value:t?.rawValue??null,event:e})})};_touchendHandler=e=>{let a=ea(e);a&&this._mouseupHandler({target:a})};_getCellFromElement(e){let a=dt(e);if(a){let t=a.getAttribute("data-mat-row"),r=a.getAttribute("data-mat-col");if(t&&r)return this.rows[parseInt(t)][parseInt(r)]}return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=C({type:i,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[Y],attrs:va,decls:11,vars:11,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(P(0,wa,3,6,"tr",0),Ie(1,ka,4,1,"tr",1,Ca,!0),d(3,"span",2),D(4),c(),d(5,"span",2),D(6),c(),d(7,"span",2),D(8),c(),d(9,"span",2),D(10),c()),a&2&&(de(t._firstRowOffset<t.labelMinRequiredCells?0:-1),l(),xe(t.rows),l(2),_("id",t._startDateLabelId),l(),U(" ",t.startDateAccessibleName,`
|
|
1
|
+
import{a as Ut}from"./chunk-YEDKRNXU.js";import{b as it,c as rt,d as Qt}from"./chunk-TQZQYUFG.js";import{a as Zt,b as Xt}from"./chunk-7QWJJPNG.js";import{a as Gt,k as $t,l as nt}from"./chunk-CD3BSGAP.js";import{F as $,K as Lt,M as tt,N as Bt,R as at,S as Ht,T as zt,W as Kt,_ as Le,ba as Wt,d as Je,da as jt,ea as qt,f as L,g as Yt,m as et,n as pe,o as Ne,v as Pt,x as Nt,y as ue,z as W}from"./chunk-ZHY3BUQJ.js";import{a as Ye,d as Pe,e as he,f as Tt,g as Ft,k as Rt,t as Ot}from"./chunk-RVXZOIFQ.js";import{$ as Ce,$a as l,$b as k,Ba as Se,Ca as At,D as ne,Db as de,E as Ct,Fa as p,Ga as qe,Gb as Ie,Hb as xe,Ib as d,Ic as Vt,Jb as c,Ka as z,Kb as I,Kc as T,Ma as Ge,Mc as R,N as wt,Ob as le,Pb as Te,Qa as Mt,Qb as g,Rb as u,Sb as ce,Sc as It,Ta as Qe,Tb as Q,Wc as xt,Yb as Et,Zb as x,_b as M,a as A,ab as kt,cb as Ue,d as S,eb as St,ec as D,fb as $e,fc as F,gc as U,hc as Xe,ia as We,ja as O,jc as Fe,ka as we,kb as C,kc as Re,la as G,lb as Ee,lc as Oe,ma as Ae,mb as E,na as o,o as ve,ob as K,pa as Me,pc as N,qa as ke,qb as P,ua as Y,ub as b,va as y,vb as _,wa as v,wb as Ve,xa as se,xb as V,ya as je,za as oe,zb as Ze}from"./chunk-UXRO4UFY.js";import{a as yt,b as vt}from"./chunk-7DCB7DB2.js";var st=new G("MAT_DATE_LOCALE",{providedIn:"root",factory:Da});function Da(){return o(Vt)}var Z="Method not implemented",m=class{locale;_localeChanges=new S;localeChanges=this._localeChanges;setTime(s,e,a,t){throw new Error(Z)}getHours(s){throw new Error(Z)}getMinutes(s){throw new Error(Z)}getSeconds(s){throw new Error(Z)}parseTime(s,e){throw new Error(Z)}addSeconds(s,e){throw new Error(Z)}getValidDateOrNull(s){return this.isDateInstance(s)&&this.isValid(s)?s:null}deserialize(s){return s==null||this.isDateInstance(s)&&this.isValid(s)?s:this.invalid()}setLocale(s){this.locale=s,this._localeChanges.next()}compareDate(s,e){return this.getYear(s)-this.getYear(e)||this.getMonth(s)-this.getMonth(e)||this.getDate(s)-this.getDate(e)}compareTime(s,e){return this.getHours(s)-this.getHours(e)||this.getMinutes(s)-this.getMinutes(e)||this.getSeconds(s)-this.getSeconds(e)}sameDate(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareDate(s,e):a==t}return s==e}sameTime(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareTime(s,e):a==t}return s==e}clampDate(s,e,a){return e&&this.compareDate(s,e)<0?e:a&&this.compareDate(s,a)>0?a:s}},B=new G("mat-date-formats");var va=["mat-calendar-body",""];function Ca(i,s){return this._trackRow(s)}var sa=(i,s)=>s.id;function wa(i,s){if(i&1&&(d(0,"tr",0)(1,"td",3),D(2),c()()),i&2){let e=u();l(),Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e.numCols),l(),U(" ",e.label," ")}}function Aa(i,s){if(i&1&&(d(0,"td",3),D(1),c()),i&2){let e=u(2);Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e._firstRowOffset),l(),U(" ",e._firstRowOffset>=e.labelMinRequiredCells?e.label:""," ")}}function Ma(i,s){if(i&1){let e=le();d(0,"td",6)(1,"button",7),g("click",function(t){let r=y(e).$implicit,n=u(2);return v(n._cellClicked(r,t))})("focus",function(t){let r=y(e).$implicit,n=u(2);return v(n._emitActiveDateChange(r,t))}),d(2,"span",8),D(3),c(),I(4,"span",9),c()()}if(i&2){let e=s.$implicit,a=s.$index,t=u().$index,r=u();Ve("width",r._cellWidth)("padding-top",r._cellPadding)("padding-bottom",r._cellPadding),b("data-mat-row",t)("data-mat-col",a),l(),V("mat-calendar-body-disabled",!e.enabled)("mat-calendar-body-active",r._isActiveCell(t,a))("mat-calendar-body-range-start",r._isRangeStart(e.compareValue))("mat-calendar-body-range-end",r._isRangeEnd(e.compareValue))("mat-calendar-body-in-range",r._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start",r._isComparisonBridgeStart(e.compareValue,t,a))("mat-calendar-body-comparison-bridge-end",r._isComparisonBridgeEnd(e.compareValue,t,a))("mat-calendar-body-comparison-start",r._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end",r._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range",r._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start",r._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end",r._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview",r._isInPreview(e.compareValue)),_("ngClass",e.cssClasses)("tabindex",r._isActiveCell(t,a)?0:-1),b("aria-label",e.ariaLabel)("aria-disabled",!e.enabled||null)("aria-pressed",r._isSelected(e.compareValue))("aria-current",r.todayValue===e.compareValue?"date":null)("aria-describedby",r._getDescribedby(e.compareValue)),l(),V("mat-calendar-body-selected",r._isSelected(e.compareValue))("mat-calendar-body-comparison-identical",r._isComparisonIdentical(e.compareValue))("mat-calendar-body-today",r.todayValue===e.compareValue),l(),U(" ",e.displayValue," ")}}function ka(i,s){if(i&1&&(d(0,"tr",1),P(1,Aa,2,6,"td",4),Ie(2,Ma,5,48,"td",5,sa),c()),i&2){let e=s.$implicit,a=s.$index,t=u();l(),de(a===0&&t._firstRowOffset?1:-1),l(),xe(e)}}function Sa(i,s){if(i&1&&(d(0,"th",2)(1,"span",6),D(2),c(),d(3,"span",3),D(4),c()()),i&2){let e=s.$implicit;l(2),F(e.long),l(2),F(e.narrow)}}var oa=["*"];function Ea(i,s){}function Va(i,s){if(i&1){let e=le();d(0,"mat-month-view",4),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("_userSelection",function(t){y(e);let r=u();return v(r._dateSelected(t))})("dragStarted",function(t){y(e);let r=u();return v(r._dragStarted(t))})("dragEnded",function(t){y(e);let r=u();return v(r._dragEnded(t))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("startDateAccessibleName",e.startDateAccessibleName)("endDateAccessibleName",e.endDateAccessibleName)("activeDrag",e._activeDrag)}}function Ia(i,s){if(i&1){let e=le();d(0,"mat-year-view",5),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("monthSelected",function(t){y(e);let r=u();return v(r._monthSelectedInYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"month"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function xa(i,s){if(i&1){let e=le();d(0,"mat-multi-year-view",6),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("yearSelected",function(t){y(e);let r=u();return v(r._yearSelectedInMultiYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"year"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function Ta(i,s){}var Fa=["button"],Ra=[[["","matDatepickerToggleIcon",""]]],Oa=["[matDatepickerToggleIcon]"];function Ya(i,s){i&1&&(se(),d(0,"svg",2),I(1,"path",3),c())}var Pa=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Na=["input[matStartDate]","input[matEndDate]"];function La(i,s){i&1&&(d(0,"div",0),Q(1),c())}var re=(()=>{class i{changes=new S;calendarLabel="Calendar";openCalendarLabel="Open calendar";closeCalendarLabel="Close calendar";prevMonthLabel="Previous month";nextMonthLabel="Next month";prevYearLabel="Previous year";nextYearLabel="Next year";prevMultiYearLabel="Previous 24 years";nextMultiYearLabel="Next 24 years";switchToMonthViewLabel="Choose date";switchToMultiYearViewLabel="Choose month and year";startDateLabel="Start date";endDateLabel="End date";comparisonDateLabel="Comparison range";formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}static \u0275fac=function(a){return new(a||i)};static \u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Ba=0,ge=class{value;displayValue;ariaLabel;enabled;cssClasses;compareValue;rawValue;id=Ba++;constructor(s,e,a,t,r={},n=s,h){this.value=s,this.displayValue=e,this.ariaLabel=a,this.enabled=t,this.cssClasses=r,this.compareValue=n,this.rawValue=h}},Ha={passive:!1,capture:!0},Be={passive:!0,capture:!0},Jt={passive:!0},te=(()=>{class i{_elementRef=o(z);_ngZone=o(qe);_platform=o(Yt);_intl=o(re);_eventCleanups;_skipNextFocus;_focusActiveCellAfterViewChecked=!1;label;rows;todayValue;startValue;endValue;labelMinRequiredCells;numCols=7;activeCell=0;ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}isRange=!1;cellAspectRatio=1;comparisonStart;comparisonEnd;previewStart=null;previewEnd=null;startDateAccessibleName;endDateAccessibleName;selectedValueChange=new p;previewChange=new p;activeDateChange=new p;dragStarted=new p;dragEnded=new p;_firstRowOffset;_cellPadding;_cellWidth;_startDateLabelId;_endDateLabelId;_comparisonStartDateLabelId;_comparisonEndDateLabelId;_didDragSinceMouseDown=!1;_injector=o(Se);comparisonDateAccessibleName=this._intl.comparisonDateLabel;_trackRow=e=>e;constructor(){let e=o(Ue),a=o(ue);this._startDateLabelId=a.getId("mat-calendar-body-start-"),this._endDateLabelId=a.getId("mat-calendar-body-end-"),this._comparisonStartDateLabelId=a.getId("mat-calendar-body-comparison-start-"),this._comparisonEndDateLabelId=a.getId("mat-calendar-body-comparison-end-"),o(pe).load(Gt),this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,r=[L(e,t,"touchmove",this._touchmoveHandler,Ha),L(e,t,"mouseenter",this._enterHandler,Be),L(e,t,"focus",this._enterHandler,Be),L(e,t,"mouseleave",this._leaveHandler,Be),L(e,t,"blur",this._leaveHandler,Be),L(e,t,"mousedown",this._mousedownHandler,Jt),L(e,t,"touchstart",this._mousedownHandler,Jt)];this._platform.isBrowser&&r.push(e.listen("window","mouseup",this._mouseupHandler),e.listen("window","touchend",this._touchendHandler)),this._eventCleanups=r})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:r}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?r-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/r}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/r}%`)}ngOnDestroy(){this._eventCleanups.forEach(e=>e())}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){Qe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return lt(e,this.startValue,this.endValue)}_isRangeEnd(e){return ct(e,this.startValue,this.endValue)}_isInRange(e){return ht(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return lt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let r=this.rows[a][t-1];if(!r){let n=this.rows[a-1];r=n&&n[n.length-1]}return r&&!this._isRangeEnd(r.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let r=this.rows[a][t+1];if(!r){let n=this.rows[a+1];r=n&&n[0]}return r&&!this._isRangeStart(r.compareValue)}_isComparisonEnd(e){return ct(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return ht(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return lt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return ct(e,this.previewStart,this.previewEnd)}_isInPreview(e){return ht(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){if(!this.isRange)return null;if(this.startValue===e&&this.endValue===e)return`${this._startDateLabelId} ${this._endDateLabelId}`;if(this.startValue===e)return this._startDateLabelId;if(this.endValue===e)return this._endDateLabelId;if(this.comparisonStart!==null&&this.comparisonEnd!==null){if(e===this.comparisonStart&&e===this.comparisonEnd)return`${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;if(e===this.comparisonStart)return this._comparisonStartDateLabelId;if(e===this.comparisonEnd)return this._comparisonEndDateLabelId}return null}_enterHandler=e=>{if(this._skipNextFocus&&e.type==="focus"){this._skipNextFocus=!1;return}if(e.target&&this.isRange){let a=this._getCellFromElement(e.target);a&&this._ngZone.run(()=>this.previewChange.emit({value:a.enabled?a:null,event:e}))}};_touchmoveHandler=e=>{if(!this.isRange)return;let a=ea(e),t=a?this._getCellFromElement(a):null;a!==e.target&&(this._didDragSinceMouseDown=!0),dt(e.target)&&e.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:t?.enabled?t:null,event:e}))};_leaveHandler=e=>{this.previewEnd!==null&&this.isRange&&(e.type!=="blur"&&(this._didDragSinceMouseDown=!0),e.target&&this._getCellFromElement(e.target)&&!(e.relatedTarget&&this._getCellFromElement(e.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:e})))};_mousedownHandler=e=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let a=e.target&&this._getCellFromElement(e.target);!a||!this._isInRange(a.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:a.rawValue,event:e})})};_mouseupHandler=e=>{if(!this.isRange)return;let a=dt(e.target);if(!a){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:e})});return}a.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let t=this._getCellFromElement(a);this.dragEnded.emit({value:t?.rawValue??null,event:e})})};_touchendHandler=e=>{let a=ea(e);a&&this._mouseupHandler({target:a})};_getCellFromElement(e){let a=dt(e);if(a){let t=a.getAttribute("data-mat-row"),r=a.getAttribute("data-mat-col");if(t&&r)return this.rows[parseInt(t)][parseInt(r)]}return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=C({type:i,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[Y],attrs:va,decls:11,vars:11,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(P(0,wa,3,6,"tr",0),Ie(1,ka,4,1,"tr",1,Ca,!0),d(3,"span",2),D(4),c(),d(5,"span",2),D(6),c(),d(7,"span",2),D(8),c(),d(9,"span",2),D(10),c()),a&2&&(de(t._firstRowOffset<t.labelMinRequiredCells?0:-1),l(),xe(t.rows),l(2),_("id",t._startDateLabelId),l(),U(" ",t.startDateAccessibleName,`
|
|
2
2
|
`),l(),_("id",t._endDateLabelId),l(),U(" ",t.endDateAccessibleName,`
|
|
3
3
|
`),l(),_("id",t._comparisonStartDateLabelId),l(),Xe(" ",t.comparisonDateAccessibleName," ",t.startDateAccessibleName,`
|
|
4
4
|
`),l(),_("id",t._comparisonEndDateLabelId),l(),Xe(" ",t.comparisonDateAccessibleName," ",t.endDateAccessibleName,`
|