dealpos 26.37.99 → 26.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-MJJU2PQ6.js → chunk-2RTF6GBC.js} +1 -1
- package/browser/{chunk-76BDGOGC.js → chunk-2SGJ47YE.js} +1 -1
- package/browser/{chunk-RAK7WN7M.js → chunk-2T2GGE2G.js} +1 -1
- package/browser/{chunk-GY635CIU.js → chunk-3EGJXGHY.js} +1 -1
- package/browser/chunk-3ZCCTYWR.js +1 -0
- package/browser/{chunk-IJTSPB3P.js → chunk-4XVFNF5D.js} +1 -1
- package/browser/{chunk-S2OL6BKS.js → chunk-4YYVFGKF.js} +1 -1
- package/browser/chunk-523IXYSW.js +2 -0
- package/browser/{chunk-GQOP6HPK.js → chunk-52Z4WGKX.js} +1 -1
- package/browser/{chunk-JXJM5KKU.js → chunk-5IMZQ75C.js} +1 -1
- package/browser/{chunk-2XF4SQGB.js → chunk-5LPTTZCD.js} +1 -1
- package/browser/{chunk-YQBZXIGU.js → chunk-5VKNAKLI.js} +1 -1
- package/browser/chunk-6VKSJFQR.js +1 -0
- package/browser/{chunk-CZCRJRRU.js → chunk-6WPHQHYL.js} +1 -1
- package/browser/chunk-72KDCZUC.js +24 -0
- package/browser/chunk-7CGMAGL7.js +1 -0
- package/browser/{chunk-I442ZDID.js → chunk-7FOLZXG6.js} +7 -7
- package/browser/{chunk-P4VTITMO.js → chunk-7KWACXCO.js} +1 -1
- package/browser/{chunk-QCE7P3AF.js → chunk-7VA5U72W.js} +1 -1
- package/browser/{chunk-J4TBT56E.js → chunk-7WXDE6VO.js} +1 -1
- package/browser/{chunk-ZAA55VDC.js → chunk-7XKB4BAY.js} +1 -1
- package/browser/chunk-7Y7QIF3M.js +64 -0
- package/browser/{chunk-T2LU5EDO.js → chunk-ACZIRL4P.js} +1 -1
- package/browser/chunk-AH44QPBY.js +1 -0
- package/browser/chunk-AKFITUWO.js +3 -0
- package/browser/{chunk-BFTH3HG3.js → chunk-AKTY745O.js} +1 -1
- package/browser/{chunk-2LRPNBIZ.js → chunk-ATYLLB7K.js} +1 -1
- package/browser/{chunk-3IMA7JX2.js → chunk-AUH3F7VJ.js} +1 -1
- package/browser/{chunk-LV2EM5PE.js → chunk-B3YR4O2D.js} +1 -1
- package/browser/{chunk-N65724MZ.js → chunk-BGJTCJSZ.js} +1 -1
- package/browser/{chunk-4R6KRDUM.js → chunk-BKUPIOIE.js} +1 -1
- package/browser/chunk-BOVU5PP4.js +1 -0
- package/browser/{chunk-YSUQ4TQR.js → chunk-BT4SM6HM.js} +9 -9
- package/browser/{chunk-5MFMWKPT.js → chunk-BT6I3GLZ.js} +1 -1
- package/browser/{chunk-5EBRW6ZC.js → chunk-BVM6IUVV.js} +1 -1
- package/browser/chunk-CHBYGM4D.js +2 -0
- package/browser/{chunk-52VDLJX3.js → chunk-CK36G5DP.js} +1 -1
- package/browser/{chunk-4XSV7F5B.js → chunk-D2LKV3MQ.js} +1 -1
- package/browser/{chunk-C6J6436K.js → chunk-D4GZUGKH.js} +1 -1
- package/browser/{chunk-7JFUDSGK.js → chunk-D6MR4RHO.js} +1 -1
- package/browser/chunk-DHOUNCEY.js +10 -0
- package/browser/{chunk-6QMNTGPS.js → chunk-DI5ZTYZE.js} +1 -1
- package/browser/chunk-DJS76BSO.js +1 -0
- package/browser/{chunk-3MKL3GIZ.js → chunk-DNZ6WZMK.js} +1 -1
- package/browser/{chunk-NS7XVMGO.js → chunk-DPDUWR3R.js} +1 -1
- package/browser/{chunk-6NW5HMRI.js → chunk-DPUDQ54N.js} +1 -1
- package/browser/{chunk-YAPZJV6C.js → chunk-E2CLRDUU.js} +1 -1
- package/browser/{chunk-6TKH6A7Z.js → chunk-E2I56UV3.js} +1 -1
- package/browser/{chunk-A5IL6L4M.js → chunk-E5ONRRWD.js} +1 -1
- package/browser/{chunk-ZWU7GJBU.js → chunk-E7S4UXXJ.js} +1 -1
- package/browser/chunk-EDBVMDBE.js +219 -0
- package/browser/{chunk-HYMKEQRK.js → chunk-EEWYYAYS.js} +1 -1
- package/browser/{chunk-JPUWDFR3.js → chunk-EGKCK6DR.js} +1 -1
- package/browser/{chunk-DW7ATNYM.js → chunk-EHY2J6WZ.js} +1 -1
- package/browser/{chunk-ANJITBFX.js → chunk-FGAOBBA2.js} +1 -1
- package/browser/chunk-FTEBVVGY.js +1 -0
- package/browser/{chunk-5GAAJ6LJ.js → chunk-FVAM267W.js} +1 -1
- package/browser/{chunk-4RLEAXWK.js → chunk-G2MQ6DZO.js} +1 -1
- package/browser/chunk-G45RHKRP.js +1 -0
- package/browser/{chunk-4ACPGEZO.js → chunk-G7ECWFIQ.js} +1 -1
- package/browser/chunk-GCBRQHG7.js +1 -0
- package/browser/chunk-GJUVTIB7.js +1 -0
- package/browser/{chunk-IFZ57INI.js → chunk-GZWWKLLX.js} +1 -1
- package/browser/{chunk-TPWOW4NV.js → chunk-H5ZX6G6P.js} +1 -1
- package/browser/{chunk-QZCQ65U4.js → chunk-HEDX3ISH.js} +1 -1
- package/browser/{chunk-HKXVWK56.js → chunk-HEJ5SBE2.js} +1 -1
- package/browser/{chunk-G5G3K5F3.js → chunk-HELMDC6X.js} +1 -1
- package/browser/{chunk-SXQAEOBE.js → chunk-HIOVYMGV.js} +1 -1
- package/browser/{chunk-Y3OSZVSG.js → chunk-HLVNKD4U.js} +1 -1
- package/browser/chunk-HPS65ID4.js +28 -0
- package/browser/{chunk-5J7HIHBR.js → chunk-ICC6FVWS.js} +1 -1
- package/browser/{chunk-F72QE6VX.js → chunk-IF3XSEAI.js} +1 -1
- package/browser/chunk-IG5QFXLW.js +1 -0
- package/browser/{chunk-TGGMXGXX.js → chunk-IIRFIAQJ.js} +1 -1
- package/browser/{chunk-2TIVUFM6.js → chunk-J45GK6XR.js} +1 -1
- package/browser/{chunk-RCXY7WN3.js → chunk-JF4HCRCY.js} +2 -2
- package/browser/chunk-JKK6RJ3U.js +4 -0
- package/browser/{chunk-DYVCVB32.js → chunk-JM43WDNT.js} +1 -1
- package/browser/chunk-KBYCPMCT.js +1 -0
- package/browser/{chunk-M2NURHMU.js → chunk-KFWYMU6T.js} +1 -1
- package/browser/chunk-KMJRW45O.js +57 -0
- package/browser/{chunk-UERG4GWN.js → chunk-KTKZKZ3B.js} +1 -1
- package/browser/{chunk-FDEZ5MAQ.js → chunk-KTW6MVSC.js} +1 -1
- package/browser/{chunk-L4SUZDWW.js → chunk-KV5NRCRJ.js} +1 -1
- package/browser/{chunk-25PMB6DG.js → chunk-LE3LOAVJ.js} +1 -1
- package/browser/chunk-LJBB6SS3.js +1 -0
- package/browser/chunk-LZKHY4LH.js +1 -0
- package/browser/{chunk-QZTAG47Q.js → chunk-M3YEP2JJ.js} +1 -1
- package/browser/chunk-MIICC3HZ.js +2 -0
- package/browser/{chunk-DDXSKCSQ.js → chunk-MLQ7A5DV.js} +1 -1
- package/browser/chunk-MM7JIKPR.js +1 -0
- package/browser/{chunk-DJ3SHNRH.js → chunk-N6SBRIIU.js} +1 -1
- package/browser/{chunk-VNLBVIGL.js → chunk-NFRV2OJS.js} +1 -1
- package/browser/chunk-OQ5XRFZ5.js +1 -0
- package/browser/{chunk-CUG5OU2K.js → chunk-OUDGJ5QG.js} +1 -1
- package/browser/{chunk-X3XFRI7I.js → chunk-OWUYLALB.js} +1 -1
- package/browser/{chunk-VMPCDL26.js → chunk-PP7F6PPS.js} +2 -2
- package/browser/{chunk-5YLOE2OL.js → chunk-PWY2U5V6.js} +1 -1
- package/browser/{chunk-N56YDMN6.js → chunk-Q7T24WF5.js} +1 -1
- package/browser/{chunk-MS7RANBB.js → chunk-QJLNIS5Q.js} +1 -1
- package/browser/{chunk-JUFZTD4M.js → chunk-R5HGAN4W.js} +1 -1
- package/browser/{chunk-KX3O6YCE.js → chunk-REPGSC4I.js} +1 -1
- package/browser/chunk-S2OU6TXL.js +1 -0
- package/browser/chunk-SF3LIK2I.js +1 -0
- package/browser/{chunk-QKHGQCHS.js → chunk-SJ6XP33Z.js} +1 -1
- package/browser/{chunk-5W3H6RFA.js → chunk-SNMBGIFK.js} +1 -1
- package/browser/{chunk-2VMTP23W.js → chunk-SRF5AUU5.js} +1 -1
- package/browser/{chunk-B5IGPTD3.js → chunk-SY5MKSWX.js} +1 -1
- package/browser/chunk-TXNYFGJN.js +11 -0
- package/browser/chunk-UV5WBOB6.js +1 -0
- package/browser/{chunk-VRMGVG6A.js → chunk-UYF6QE36.js} +1 -1
- package/browser/{chunk-OC62HJ57.js → chunk-VBJQZUVP.js} +1 -1
- package/browser/{chunk-MD6CLSH7.js → chunk-W66Z7PDQ.js} +1 -1
- package/browser/{chunk-CDSQFYB2.js → chunk-W7IF6NYT.js} +1 -1
- package/browser/{chunk-IBUGVRIY.js → chunk-WLK5ZP65.js} +1 -1
- package/browser/chunk-WMW67POM.js +9 -0
- package/browser/{chunk-QNR562S7.js → chunk-WSMI43MR.js} +1 -1
- package/browser/{chunk-QR5A3DYR.js → chunk-XGXPNYMH.js} +1 -1
- package/browser/{chunk-3TSVT73T.js → chunk-XSGEI2DL.js} +1 -1
- package/browser/chunk-XVLJV5W6.js +11 -0
- package/browser/{chunk-VZCT7DQF.js → chunk-YCMRRHGQ.js} +1 -1
- package/browser/chunk-YDBR6J4L.js +1 -0
- package/browser/chunk-YI4S5PA6.js +45 -0
- package/browser/{chunk-ZG6SJ4ER.js → chunk-ZUSHUPID.js} +1 -1
- package/browser/{chunk-JMPDEKHS.js → chunk-ZZW5Y2VY.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-LBUUQLF7.js → main-E5KNWKQY.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-2FNUMVYB.js +0 -1
- package/browser/chunk-2V75VLS6.js +0 -1
- package/browser/chunk-3NIZQVOC.js +0 -57
- package/browser/chunk-3ONISWYN.js +0 -218
- package/browser/chunk-6GYZP7HD.js +0 -1
- package/browser/chunk-BN7VHFSY.js +0 -1
- package/browser/chunk-COBRNIYT.js +0 -1
- package/browser/chunk-CPYUW4JK.js +0 -11
- package/browser/chunk-DPID4J5J.js +0 -1
- package/browser/chunk-EFPCKDPG.js +0 -1
- package/browser/chunk-EXJ6CEYQ.js +0 -1
- package/browser/chunk-IGF265BG.js +0 -1
- package/browser/chunk-JHGU4A3K.js +0 -24
- package/browser/chunk-KKR4FTXY.js +0 -1
- package/browser/chunk-KXLFBYEJ.js +0 -1
- package/browser/chunk-NBOXCCJS.js +0 -3
- package/browser/chunk-NEHPQJQN.js +0 -28
- package/browser/chunk-NU42B7PZ.js +0 -1
- package/browser/chunk-PFQEBV3S.js +0 -1
- package/browser/chunk-PYSF5DTN.js +0 -45
- package/browser/chunk-QHRW7YDB.js +0 -1
- package/browser/chunk-R6T6HB4J.js +0 -10
- package/browser/chunk-RFCCGBAC.js +0 -1
- package/browser/chunk-RKJ7JRV3.js +0 -64
- package/browser/chunk-S4PZBOGH.js +0 -11
- package/browser/chunk-SVCABKIT.js +0 -1
- package/browser/chunk-T76NUBX5.js +0 -4
- package/browser/chunk-V5NKBARH.js +0 -2
- package/browser/chunk-WV7KUILK.js +0 -1
- package/browser/chunk-XFYVRZ5C.js +0 -10
- package/browser/chunk-XVMDFG2U.js +0 -1
- package/browser/chunk-Z4VHBV55.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ve}from"./chunk-WGVXNG3I.js";import{a as fe}from"./chunk-CI7WB3BR.js";import{a as Ce}from"./chunk-QI7I4TZD.js";import"./chunk-BYXBJQAS.js";import"./chunk-64E2KYWA.js";import{g as se,h as ce}from"./chunk-RKJ7JRV3.js";import"./chunk-F72QE6VX.js";import{a as ue}from"./chunk-IGF265BG.js";import"./chunk-YBMKTLKP.js";import"./chunk-QAK7KBYZ.js";import"./chunk-DJ3SHNRH.js";import"./chunk-ZK5X3QHG.js";import"./chunk-2QGJVMDP.js";import"./chunk-ZMJGUKRR.js";import"./chunk-IWAI7MVS.js";import"./chunk-PPMQE2JW.js";import"./chunk-XAGPF2DG.js";import"./chunk-QCE7P3AF.js";import{a as de,b as me,c as pe}from"./chunk-77MBEZAF.js";import"./chunk-AXL4BYTM.js";import"./chunk-7YB46QHZ.js";import"./chunk-NNCNCSRM.js";import"./chunk-APJZ7FTS.js";import"./chunk-HDB7WDVX.js";import{a as k}from"./chunk-ICRIBA3P.js";import{b as ae,c as le}from"./chunk-IZ6OEFHZ.js";import"./chunk-ZLF22NO2.js";import"./chunk-Y6W7XUTQ.js";import"./chunk-LKCUXC3X.js";import"./chunk-CNL7LBPM.js";import{E as te,F as ne,G as ie,c as Y,e as _,h as X,i as Q,q as Z,w as ee,x as oe}from"./chunk-7OJUWRPB.js";import"./chunk-76BDGOGC.js";import"./chunk-JMPDEKHS.js";import"./chunk-QOCZG4DD.js";import{b as re}from"./chunk-DA5OOQPS.js";import{a as F}from"./chunk-PPTZHIIZ.js";import"./chunk-YQBZXIGU.js";import{n as z,q as J}from"./chunk-UBUWTJXF.js";import{Ab as O,Ac as q,Ca as V,Cb as U,D as T,Db as H,Eb as m,Fb as i,Gb as r,Hb as c,Mc as K,Nb as $,Od as W,Pc as L,Qb as G,Tb as v,Va as l,Vb as f,ab as C,dc as j,eb as E,ic as a,jb as A,jc as x,jd as R,kb as I,kc as w,oa as b,od as B,r as D,sa as S,ta as P,wd as M,xb as p,zb as u,zc as h}from"./chunk-45TUMJS2.js";import"./chunk-NF7PG5F2.js";var N=n=>({"is-invalid":n});function Se(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function Pe(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ee(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var y=class n{constructor(d){this.data=d;this.config=new ae,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}data;dialogRef=b(de);config;fb=b(te);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[_.required]],validateCoupon:[this.data?.validateCoupon||"",[_.required]],redeemCoupon:[this.data?.redeemCoupon||"",[_.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[_.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(C(me))};static \u0275cmp=E({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),p(19,Se,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),p(24,Pe,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),p(29,Ee,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),p(34,Ge,2,0,"div",20),r()()()()()()()),e&2&&(m("config",o.config),l(5),m("formGroup",o.formGroup),l(5),m("ngClass",h(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),m("ngClass",h(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),m("ngClass",h(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),m("ngClass",h(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[M,R,ie,Z,Y,X,Q,oe,ee,le,ve],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var xe=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){S(e);let t=f();return P(t.addNewCouponProvider())}),a(1," Add "),r()}}function Me(n,d){n&1&&c(0,"th",8)}function Ne(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){S(e);let t=f().$index,s=f(2);return P(s.onDeleteProvider(t))}),r()()}}function Te(n,d){if(n&1){let e=G();i(0,"tr"),p(1,Ne,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=S(e),s=t.$implicit,g=t.$index,be=f(2);return P(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=f(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),m("ngClass",q(7,xe,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function Ie(n,d){if(n&1&&U(0,Te,14,10,"tr",null,O),n&2){let e=f();H(e.listProviders())}}function we(n,d){n&1&&$(0)}function Fe(n,d){if(n&1&&I(0,we,1,0,"ng-container",15),n&2){f();let e=j(25);m("ngTemplateOutlet",e)}}function ke(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var ge=class n extends fe{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}activatedRoute;role;dialog;toastr=b(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(y).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(y,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(C(ue),C(J),C(W),C(re),C(pe))};static \u0275cmp=E({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),p(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),p(10,Me,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),p(22,Ie,2,0)(23,Fe,1,1,"ng-container"),r()()()()(),I(24,ke,3,0,"ng-template",null,0,K),r()()),o&2){let s;m("pageData",t.menuData())("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[M,R,B,ce,se,ne,Ce],encapsulation:2,changeDetection:0})};export{ge as CouponConfigurationComponent};
|
|
1
|
+
import{a as ve}from"./chunk-WGVXNG3I.js";import{a as fe}from"./chunk-CI7WB3BR.js";import{a as Ce}from"./chunk-QI7I4TZD.js";import"./chunk-BYXBJQAS.js";import"./chunk-64E2KYWA.js";import{g as se,h as ce}from"./chunk-7Y7QIF3M.js";import"./chunk-IF3XSEAI.js";import{a as ue}from"./chunk-BOVU5PP4.js";import"./chunk-YBMKTLKP.js";import"./chunk-QAK7KBYZ.js";import"./chunk-N6SBRIIU.js";import"./chunk-ZK5X3QHG.js";import"./chunk-2QGJVMDP.js";import"./chunk-ZMJGUKRR.js";import"./chunk-IWAI7MVS.js";import"./chunk-PPMQE2JW.js";import"./chunk-XAGPF2DG.js";import"./chunk-7VA5U72W.js";import{a as de,b as me,c as pe}from"./chunk-77MBEZAF.js";import"./chunk-AXL4BYTM.js";import"./chunk-7YB46QHZ.js";import"./chunk-NNCNCSRM.js";import"./chunk-APJZ7FTS.js";import"./chunk-HDB7WDVX.js";import{a as k}from"./chunk-ICRIBA3P.js";import{b as ae,c as le}from"./chunk-IZ6OEFHZ.js";import"./chunk-ZLF22NO2.js";import"./chunk-Y6W7XUTQ.js";import"./chunk-LKCUXC3X.js";import"./chunk-CNL7LBPM.js";import{E as te,F as ne,G as ie,c as Y,e as _,h as X,i as Q,q as Z,w as ee,x as oe}from"./chunk-7OJUWRPB.js";import"./chunk-2SGJ47YE.js";import"./chunk-ZZW5Y2VY.js";import"./chunk-QOCZG4DD.js";import{b as re}from"./chunk-DA5OOQPS.js";import{a as F}from"./chunk-PPTZHIIZ.js";import"./chunk-5VKNAKLI.js";import{n as z,q as J}from"./chunk-UBUWTJXF.js";import{Ab as O,Ac as q,Ca as V,Cb as U,D as T,Db as H,Eb as m,Fb as i,Gb as r,Hb as c,Mc as K,Nb as $,Od as W,Pc as L,Qb as G,Tb as v,Va as l,Vb as f,ab as C,dc as j,eb as E,ic as a,jb as A,jc as x,jd as R,kb as I,kc as w,oa as b,od as B,r as D,sa as S,ta as P,wd as M,xb as p,zb as u,zc as h}from"./chunk-45TUMJS2.js";import"./chunk-NF7PG5F2.js";var N=n=>({"is-invalid":n});function Se(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function Pe(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ee(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var y=class n{constructor(d){this.data=d;this.config=new ae,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}data;dialogRef=b(de);config;fb=b(te);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[_.required]],validateCoupon:[this.data?.validateCoupon||"",[_.required]],redeemCoupon:[this.data?.redeemCoupon||"",[_.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[_.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(C(me))};static \u0275cmp=E({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),p(19,Se,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),p(24,Pe,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),p(29,Ee,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),p(34,Ge,2,0,"div",20),r()()()()()()()),e&2&&(m("config",o.config),l(5),m("formGroup",o.formGroup),l(5),m("ngClass",h(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),m("ngClass",h(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),m("ngClass",h(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),m("ngClass",h(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[M,R,ie,Z,Y,X,Q,oe,ee,le,ve],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var xe=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){S(e);let t=f();return P(t.addNewCouponProvider())}),a(1," Add "),r()}}function Me(n,d){n&1&&c(0,"th",8)}function Ne(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){S(e);let t=f().$index,s=f(2);return P(s.onDeleteProvider(t))}),r()()}}function Te(n,d){if(n&1){let e=G();i(0,"tr"),p(1,Ne,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=S(e),s=t.$implicit,g=t.$index,be=f(2);return P(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=f(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),m("ngClass",q(7,xe,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function Ie(n,d){if(n&1&&U(0,Te,14,10,"tr",null,O),n&2){let e=f();H(e.listProviders())}}function we(n,d){n&1&&$(0)}function Fe(n,d){if(n&1&&I(0,we,1,0,"ng-container",15),n&2){f();let e=j(25);m("ngTemplateOutlet",e)}}function ke(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var ge=class n extends fe{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}activatedRoute;role;dialog;toastr=b(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(y).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(y,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(C(ue),C(J),C(W),C(re),C(pe))};static \u0275cmp=E({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),p(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),p(10,Me,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),p(22,Ie,2,0)(23,Fe,1,1,"ng-container"),r()()()()(),I(24,ke,3,0,"ng-template",null,0,K),r()()),o&2){let s;m("pageData",t.menuData())("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[M,R,B,ce,se,ne,Ce],encapsulation:2,changeDetection:0})};export{ge as CouponConfigurationComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-ZZW5Y2VY.js";import{a as N}from"./chunk-QOCZG4DD.js";import{b as R}from"./chunk-DA5OOQPS.js";import{a as u}from"./chunk-PPTZHIIZ.js";import{q as U}from"./chunk-UBUWTJXF.js";import{Ka as T,Qd as v,ea as S,ka as p,na as m,oa as g,xa as h,xd as d}from"./chunk-45TUMJS2.js";var k=(o=>(o[o.PAID=0]="PAID",o[o.OVERDUE=1]="OVERDUE",o[o.SELL_ONLY=2]="SELL_ONLY",o[o.SUSPENDED=3]="SUSPENDED",o))(k||{});var b=(()=>{class n{constructor(){this.document=g(h),this.platformId=g(T),this.documentIsAccessible=d(this.platformId)}static getCookieRegExp(e){let i=e.replace(/([[\]{}()|=;+?,.*^$\\])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(i){return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),n.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.check(e)){e=encodeURIComponent(e);let o=n.getCookieRegExp(e).exec(this.document.cookie);return o?.[1]?n.safeDecodeURIComponent(o[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},i=this.document;return i.cookie&&i.cookie!==""&&i.cookie.split(";").forEach(o=>{let[c,s]=o.split("=");e[n.safeDecodeURIComponent(c.replace(/^ /,""))]=n.safeDecodeURIComponent(s)}),e}set(e,i,o,c,s,l,I,D){if(!this.documentIsAccessible)return;if(typeof o=="number"||o instanceof Date||c||s||l||I){let f={expires:o,path:c,domain:s,secure:l,sameSite:I||"Lax",partitioned:D};this.set(e,i,f);return}let a=encodeURIComponent(e)+"="+encodeURIComponent(i)+";",r=o||{};if(r.expires)if(typeof r.expires=="number"){let f=new Date(new Date().getTime()+r.expires*1e3*60*60*24);a+="Expires="+f.toUTCString()+";"}else a+="Expires="+r.expires.toUTCString()+";";r.path&&(a+="Path="+r.path+";"),r.domain&&(a+="Domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(a+="Secure;"),r.sameSite||(r.sameSite="Lax"),a+="SameSite="+r.sameSite+";",r.partitioned&&(a+="Partitioned;"),this.document.cookie=a}delete(e,i,o,c,s="Lax"){if(!this.documentIsAccessible)return;let l=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:l,path:i,domain:o,secure:c,sameSite:s})}deleteAll(e,i,o,c="Lax"){if(!this.documentIsAccessible)return;let s=this.getAll();for(let l in s)s.hasOwnProperty(l)&&this.delete(l,e,i,o,c)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=p({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var A=class n{constructor(t,e,i,o,c,s){this.httpService=t;this.cookieService=e;this.router=i;this.roleService=o;this.intercomService=c;this.fraction=s}httpService;cookieService;router;roleService;intercomService;fraction;role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(t){this._returnUrl=t}get returnUrl(){return this._returnUrl}login(t){return this.httpService.post("/api/Login/Web",t).pipe(S(e=>{this._loginResponse=e,e.Type=="geo"||e.Type=="totp"||this.saveLoginConfigToStorage(e)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let t=this.getSubscriptionStatus(),e=this.getRedirectUrlByRole();return(t==2||t==3)&&(e="/menu/Profile/Main/My_Subscription"),e}getRedirectUrlByRole(){let t,e=this.roleService;return e.dashboard.View?t="/menu/Dashboard":e.product.View?t="/menu/Products":t="/menu/Sell",t}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(t=>{localStorage.removeItem("Token"),localStorage.setItem("Token",t.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let t=localStorage.getItem("Token");if(t){let e=u.parseJwt(t),i=this.convertUnixTimesTamp(e.exp),o=new Date;if(i.getTime()-o.getTime()>0)return!1}return!0}isInRole(t){t.forEach(e=>e(this.role))}convertUnixTimesTamp(t){return new Date(t*1e3)}saveLoginConfigToStorage(t){localStorage.setItem("quantityFraction",JSON.stringify(t.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(t.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(t.UIConfig.Fraction.Amount.Minimum,t.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(t.UIConfig.Fraction.Quantity.Minimum,t.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(t?.AccountInfo)),localStorage.setItem("Token",t?.Token),localStorage.setItem("TinyMCEPlugins",t?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(t?.Intercom),localStorage.setItem("CloudinaryConfig",t?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",t?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(t?.SubscriptionStatus));let e=this.getParseToken();u.IsNotEmpty(e?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",e?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let t=localStorage.getItem("Token");return t&&!this._jwtToken&&(this._jwtToken=u.parseJwt(t)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let t=localStorage.getItem("SubscriptionStatus");return t?parseInt(t):null}static \u0275fac=function(e){return new(e||n)(m(U),m(b),m(v),m(R),m(C),m(N))};static \u0275prov=p({token:n,factory:n.\u0275fac,providedIn:"root"})};export{k as a,b,A as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as oe,b as le,c as ne}from"./chunk-JZCIJXV2.js";import{a as ee}from"./chunk-CE4YPYNH.js";import{b as te,c as ie}from"./chunk-TXPPVLN7.js";import{a as Z}from"./chunk-
|
|
1
|
+
import{a as oe,b as le,c as ne}from"./chunk-JZCIJXV2.js";import{a as ee}from"./chunk-CE4YPYNH.js";import{b as te,c as ie}from"./chunk-TXPPVLN7.js";import{a as Z}from"./chunk-DNZ6WZMK.js";import{F as Y,a as J,h as K,p as X}from"./chunk-7OJUWRPB.js";import{q as U}from"./chunk-UBUWTJXF.js";import{$ as N,$b as T,Ca as B,Eb as p,Fb as d,Gb as m,Gc as f,Hc as S,Qb as g,Tb as u,Tc as z,Uc as c,Va as x,Vb as n,Y as F,Zb as H,_b as L,aa as P,ba as D,d as w,ea as b,eb as $,ga as R,ic as I,ja as E,jc as q,ka as j,l as k,na as W,nc as v,oa as C,oc as y,pc as h,pd as A,r as _,sa as a,ta as s,wd as G,xb as M,xc as Q,zb as V}from"./chunk-45TUMJS2.js";var O=class l{signalRClient=C(Z);outlets$;_onOpenNgSelect=new w;onOpenNgSelect$=this._onOpenNgSelect.asObservable();_accessOutlet=new w;accessOutlet$=this._accessOutlet.asObservable();constructor(i){this.outlets$=this.accessOutlet$.pipe(P(e=>this.onOpenNgSelect$.pipe(_(()=>e))),R(this.signalRClient.recacheOutlet$),D((e,[o,t])=>t||!e.data.get(o)?.length&&e.accessType!==o?(this.signalRClient.resetOutletCache(),i.get(`/api/Outlet/SelectOptions/${o}`).pipe(b(r=>e.data.set(o,r)),_(()=>({data:e.data,accessType:o})))):k({data:e.data,accessType:e.accessType}),{data:new Map,accessType:-1}),_(e=>e.data.get(e.accessType)),F(1))}onOpenNgSelect(){this._onOpenNgSelect.next(!1)}forceLoadOutlets(){this._onOpenNgSelect.next(!0)}accessOutlet(i){this._accessOutlet.next(i)}static \u0275fac=function(e){return new(e||l)(W(U))};static \u0275prov=j({token:l,factory:l.\u0275fac,providedIn:"root"})};var ce=["multiSelect"],pe=["select"];function ue(l,i){if(l&1){let e=g();d(0,"p-floatlabel",3)(1,"p-multiselect",5,0),f(3,"async"),u("click",function(){a(e);let t=n(2);return s(t.onClickSelect())})("onChange",function(){a(e);let t=n(2);return s(t.onSelectChange())}),h("ngModelChange",function(t){a(e);let r=n(2);return y(r.value,t)||(r.value=t),s(t)}),u("onFilter",function(){a(e);let t=n(2);return s(t.onFilterChange())}),m(),d(4,"label",6),I(5),m()()}if(l&2){let e=n(2);x(),p("options",S(3,7,e.outlets$)),v("ngModel",e.value),p("disabled",e.disabled())("maxSelectedLabels",e.maxSelectedLabels())("showClear",!0)("autofocusFilter",!0),x(4),q(e.placeholder())}}function de(l,i){if(l&1){let e=g();d(0,"p-multiselect",7,0),f(2,"async"),u("click",function(){a(e);let t=n(2);return s(t.onClickSelect())})("onChange",function(){a(e);let t=n(2);return s(t.onSelectChange())}),h("ngModelChange",function(t){a(e);let r=n(2);return y(r.value,t)||(r.value=t),s(t)}),u("onFilter",function(){a(e);let t=n(2);return s(t.onFilterChange())}),m()}if(l&2){let e=n(2);p("options",S(2,7,e.outlets$))("placeholder",e.placeholder()),v("ngModel",e.value),p("disabled",e.disabled())("maxSelectedLabels",e.maxSelectedLabels())("showClear",!0)("autofocusFilter",!0)}}function me(l,i){if(l&1&&M(0,ue,6,9,"p-floatlabel",3)(1,de,3,9,"p-multiselect",4),l&2){let e=n();V(e.isFloatLabel()?0:1)}}function _e(l,i){if(l&1){let e=g();d(0,"p-select",8,1),f(2,"async"),u("click",function(){a(e);let t=n();return s(t.onClickSelect())})("onChange",function(){a(e);let t=n();return s(t.onSelectChange())}),h("ngModelChange",function(t){a(e);let r=n();return y(r.value,t)||(r.value=t),s(t)}),m()}if(l&2){let e=n();p("options",S(2,7,e.outlets$))("placeholder",e.placeholder()),v("ngModel",e.value),p("disabled",e.disabled())("filter",e.filter())("showClear",!0)("autofocusFilter",!0)}}var re=class l{outletService=C(O);accessType=c(4);multiple=c(!1);outlets=c([]);isFloatLabel=c(!1);placeholder=c("Select Outlet");maxSelectedLabels=c(4);disabled=c(!1);filter=c(!0);outlets$;onListOutlets=z();multiSelect;select;top=B(0);overlayObserver;constructor(){this.outlets$=this.outletService.outlets$.pipe(N(this.outlets()),b(i=>this.onListOutlets.emit(i)))}ngAfterViewInit(){this.initTopPosition(),this.multiple()?this.multiSelect.onClick.emit():this.select.onClick.emit()}ngOnDestroy(){this.stopOverlayObserver()}initTopPosition(){let i=document.querySelector("body");this.top.set(i.getBoundingClientRect()?.top*-1)}onClickSelect(){try{setTimeout(()=>{this.adjustOverlayPosition(),this.startOverlayObserver()},0)}catch(i){console.error("Error adjusting top position:",i)}finally{this.outletService.accessOutlet(this.accessType()),this.outletService.onOpenNgSelect()}}adjustOverlayPosition(){let i=document.querySelector(".p-overlay.p-component");if(!i)return;let e=i.getBoundingClientRect(),o=this.top()+e.top;i.style.setProperty("top",`${o}px`,"important"),getComputedStyle(i).position!=="fixed"&&i.style.setProperty("position","fixed","important")}startOverlayObserver(){let i=document.querySelector(".p-overlay.p-component");i&&(this.stopOverlayObserver(),this.overlayObserver=new MutationObserver(e=>{let o=e[0];if(o&&o.type==="attributes"&&o.attributeName==="style"){let t=o.target,r=getComputedStyle(t).display,ae=getComputedStyle(t).visibility;(r==="none"||ae==="hidden")&&(t.style.setProperty("display","block","important"),t.style.setProperty("visibility","visible","important"),t.style.setProperty("position","fixed","important"))}}),this.overlayObserver.observe(i,{attributes:!0,attributeFilter:["style"]}))}stopOverlayObserver(){this.overlayObserver&&(this.overlayObserver.disconnect(),this.overlayObserver=void 0)}onFilterChange(){setTimeout(()=>{document.querySelector(".p-overlay.p-component")&&!this.overlayObserver&&this.startOverlayObserver()},0)}value=null;onChange=()=>{};onTouched=()=>{};writeValue(i){this.value=i,i&&this.onClickSelect()}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}onSelectChange(){this.onChange(this.value)}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=$({type:l,selectors:[["outlet-selector"]],viewQuery:function(e,o){if(e&1&&H(ce,5)(pe,5),e&2){let t;L(t=T())&&(o.multiSelect=t.first),L(t=T())&&(o.select=t.first)}},inputs:{accessType:[1,"accessType"],multiple:[1,"multiple"],outlets:[1,"outlets"],isFloatLabel:[1,"isFloatLabel"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"],disabled:[1,"disabled"],filter:[1,"filter"]},outputs:{onListOutlets:"onListOutlets"},features:[Q([{provide:J,useExisting:E(()=>l),multi:!0},oe])],decls:2,vars:1,consts:[["multiSelect",""],["select",""],["optionLabel","v","optionValue","k","appendTo","body",1,"w-100",3,"options","placeholder","ngModel","disabled","filter","showClear","autofocusFilter"],["variant","on",1,"w-100"],["optionLabel","v","optionValue","k","display","chip","id","multiSelect","appendTo","body",1,"w-100",3,"options","placeholder","ngModel","disabled","maxSelectedLabels","showClear","autofocusFilter"],["optionLabel","v","optionValue","k","display","chip","id","multiSelect","appendTo","body",1,"w-100",3,"click","onChange","ngModelChange","onFilter","options","ngModel","disabled","maxSelectedLabels","showClear","autofocusFilter"],["for","multiSelect"],["optionLabel","v","optionValue","k","display","chip","id","multiSelect","appendTo","body",1,"w-100",3,"click","onChange","ngModelChange","onFilter","options","placeholder","ngModel","disabled","maxSelectedLabels","showClear","autofocusFilter"],["optionLabel","v","optionValue","k","appendTo","body",1,"w-100",3,"click","onChange","ngModelChange","options","placeholder","ngModel","disabled","filter","showClear","autofocusFilter"]],template:function(e,o){e&1&&M(0,me,2,1)(1,_e,3,9,"p-select",2),e&2&&V(o.multiple()?0:1)},dependencies:[G,ne,le,Y,K,X,ie,te,ee,A],styles:["[_nghost-%COMP%] .p-multiselect .p-overlay{width:-moz-available;width:-webkit-fill-available;width:fill-available}[_nghost-%COMP%] .p-select .p-overlay{width:-moz-available;width:-webkit-fill-available;width:fill-available}"]})};export{re as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Z,b as $}from"./chunk-B24DKIBB.js";import"./chunk-6BEG6JYE.js";import"./chunk-37OXQCY5.js";import"./chunk-EW2QDGF2.js";import"./chunk-KAOZTSSW.js";import{a as Y}from"./chunk-MEXVXDKC.js";import{p as X}from"./chunk-232L4QDQ.js";import"./chunk-C7AHZE5N.js";import"./chunk-AES2MVIS.js";import"./chunk-AKZW6L24.js";import"./chunk-T2Y6L3PM.js";import"./chunk-SBLNMOXY.js";import"./chunk-EBFSFFKT.js";import"./chunk-46AS32Y6.js";import"./chunk-TEUPLXZW.js";import"./chunk-OAR3S27F.js";import{a as Q}from"./chunk-
|
|
1
|
+
import{a as Z,b as $}from"./chunk-B24DKIBB.js";import"./chunk-6BEG6JYE.js";import"./chunk-37OXQCY5.js";import"./chunk-EW2QDGF2.js";import"./chunk-KAOZTSSW.js";import{a as Y}from"./chunk-MEXVXDKC.js";import{p as X}from"./chunk-232L4QDQ.js";import"./chunk-C7AHZE5N.js";import"./chunk-AES2MVIS.js";import"./chunk-AKZW6L24.js";import"./chunk-T2Y6L3PM.js";import"./chunk-SBLNMOXY.js";import"./chunk-EBFSFFKT.js";import"./chunk-46AS32Y6.js";import"./chunk-TEUPLXZW.js";import"./chunk-OAR3S27F.js";import{a as Q}from"./chunk-2T2GGE2G.js";import"./chunk-JZCIJXV2.js";import{a as U}from"./chunk-REPGSC4I.js";import"./chunk-7WXDE6VO.js";import"./chunk-64E2KYWA.js";import"./chunk-CE4YPYNH.js";import"./chunk-E6DX7K73.js";import{a as G,g as J,h as K}from"./chunk-7Y7QIF3M.js";import"./chunk-ZBUXJSWD.js";import"./chunk-UBFC273L.js";import"./chunk-B2PAUOAE.js";import"./chunk-TXPPVLN7.js";import"./chunk-7O57X7B6.js";import"./chunk-BS7OOL5F.js";import"./chunk-TVSZWXKF.js";import"./chunk-DFCFXDXX.js";import"./chunk-4PPHUFDR.js";import"./chunk-CXNSSMWD.js";import"./chunk-IF3XSEAI.js";import{a as z}from"./chunk-BOVU5PP4.js";import"./chunk-YBMKTLKP.js";import"./chunk-QAK7KBYZ.js";import"./chunk-N6SBRIIU.js";import"./chunk-ZK5X3QHG.js";import"./chunk-2QGJVMDP.js";import"./chunk-ZMJGUKRR.js";import"./chunk-IWAI7MVS.js";import"./chunk-PPMQE2JW.js";import"./chunk-XAGPF2DG.js";import"./chunk-NQUAJAD5.js";import{d as q}from"./chunk-YLJMYMN6.js";import"./chunk-DNZ6WZMK.js";import"./chunk-OKQYRKDJ.js";import"./chunk-KTKZKZ3B.js";import"./chunk-BODLDM6S.js";import"./chunk-7VA5U72W.js";import"./chunk-77MBEZAF.js";import"./chunk-AXL4BYTM.js";import"./chunk-7YB46QHZ.js";import"./chunk-NNCNCSRM.js";import"./chunk-APJZ7FTS.js";import"./chunk-HDB7WDVX.js";import{a as F}from"./chunk-ICRIBA3P.js";import"./chunk-URT4455F.js";import"./chunk-OAD4FS2F.js";import"./chunk-YQ4XRLUA.js";import{a as H}from"./chunk-IZ6OEFHZ.js";import"./chunk-ZLF22NO2.js";import"./chunk-Y6W7XUTQ.js";import"./chunk-LKCUXC3X.js";import"./chunk-CNL7LBPM.js";import{F as R,h as N,p as j}from"./chunk-7OJUWRPB.js";import"./chunk-2SGJ47YE.js";import"./chunk-ZZW5Y2VY.js";import"./chunk-QOCZG4DD.js";import"./chunk-DA5OOQPS.js";import"./chunk-PPTZHIIZ.js";import"./chunk-5VKNAKLI.js";import{n as W,q as V}from"./chunk-UBUWTJXF.js";import{Ab as A,Ca as y,Cb as M,Db as E,Eb as l,Fb as a,Gb as r,Hb as T,Mc as O,Qb as w,Tb as v,Va as c,Vb as p,ab as D,e as k,eb as I,ic as g,jb as B,kb as P,nc as h,oa as x,oc as _,pc as f,sa as m,ta as s,wd as L,xb as S,zb as b}from"./chunk-45TUMJS2.js";import"./chunk-NF7PG5F2.js";function te(o,d){if(o&1){let t=w();a(0,"button",6),v("click",function(){m(t);let e=p();return s(e.onPrint())}),T(1,"i",7),a(2,"span"),g(3,"Print"),r()()}}function ie(o,d){if(o&1){let t=w();a(0,"div",8)(1,"h6"),g(2,"Outlet"),r(),a(3,"outlet-selector",9),v("ngModelChange",function(e){m(t);let n=p();return s(n.onEntityIDChange(e))}),r(),a(4,"h6"),g(5,"Sales Order Tag"),r(),a(6,"ng-select",10),f("ngModelChange",function(e){m(t);let n=p();return _(n.pageData().Filter.SalesOrderTagID,e)||(n.pageData().Filter.SalesOrderTagID=e),s(e)}),r(),a(7,"h6"),g(8,"From"),r(),a(9,"div",11)(10,"div",12)(11,"datepicker",13),f("dateChange",function(e){m(t);let n=p();return _(n.pageData().Filter.From,e)||(n.pageData().Filter.From=e),s(e)}),r()(),a(12,"div",12)(13,"app-timepicker",14),f("timeChange",function(e){m(t);let n=p();return _(n.pageData().Filter.StartTime,e)||(n.pageData().Filter.StartTime=e),s(e)}),r()()(),a(14,"h6"),g(15,"To"),r(),a(16,"div",11)(17,"div",12)(18,"datepicker",15),f("dateChange",function(e){m(t);let n=p();return _(n.pageData().Filter.To,e)||(n.pageData().Filter.To=e),s(e)}),r()(),a(19,"div",12)(20,"app-timepicker",14),f("timeChange",function(e){m(t);let n=p();return _(n.pageData().Filter.EndTime,e)||(n.pageData().Filter.EndTime=e),s(e)}),r()()()()}if(o&2){let t,i=p();c(3),l("accessType",2)("ngModel",i.pageData().Filter.EntityID),c(3),l("items",(t=i.pageData())==null||t.Options==null?null:t.Options.SalesOrderTags),h("ngModel",i.pageData().Filter.SalesOrderTagID),c(5),l("isFloatingLabel",!1),h("date",i.pageData().Filter.From),l("hidelClearBtn",!0),c(2),h("time",i.pageData().Filter.StartTime),l("fullWidth",!0),c(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),h("date",i.pageData().Filter.To),c(2),h("time",i.pageData().Filter.EndTime),l("fullWidth",!0)}}function ne(o,d){o&1&&(a(0,"div",19),g(1,"\xA0"),r())}function ae(o,d){if(o&1&&(T(0,"pos-receipt-a4",16),a(1,"div",17),T(2,"div",18),r(),S(3,ne,2,0,"div",19)),o&2){let t,i=d.$implicit,e=d.$index,n=p(),u=p();l("data",i)("printTemplate",(t=u.printTemplates())==null?null:t.get(i.PrintTemplateID))("config",n.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",n.StylesSheet),c(3),b(e!==(n.Data==null?null:n.Data.length)-1?3:-1)}}function re(o,d){o&1&&M(0,ae,4,7,null,null,A),o&2&&E(d.Data)}var ee=class o extends U{constructor(t,i,e){super(t,i,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=i;this.initPrintListener()}httpService;dialogFilter=x(G);receipts=y(null);printTemplates=y(null);invoiceIds=y([]);validatedSubject=new k(!1);preInitList(){this.pageData().Filter.From=new Date,this.pageData().Filter.To=new Date,this.pageData().Filter.StartTime="00:00",this.pageData().Filter.EndTime="23:59"}onFilter(){this.httpService.post(F.GetBulkPrintA4,this.pageData().Filter).subscribe(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",H.Info):this.generatePrintTemplate(t.PrintTemplates),this.receipts.set(t),this.invoiceIds.set(t.Data.map(i=>i?.Invoice?.ID))})}generatePrintTemplate(t=[]){this.printTemplates.set(new Map(t.map(i=>[i.ID,i])))}getOpenDialogOptions(){return{validated$:this.validatedSubject.asObservable()}}onEntityIDChange(t){this.pageData().Filter.EntityID=t,this.validatedSubject.next(!!t)}onNewPrint(){this.dialogFilter.openDialog({validated$:this.validatedSubject.asObservable()})}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.post(F.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(i){return new(i||o)(D(z),D(V),D(W))};static \u0275cmp=I({type:o,selectors:[["bulk-invoice-A4"]],features:[B],decls:11,vars:7,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","hideSearchBox","text","filter","isFilterOnDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-success",3,"click"],["filters",""],[1,"container-fluid","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales Order Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],["customContainerClass","pos-bulk-invoice",3,"data","printTemplate","config","workOrderMode","fullMode","stylesheet"],[1,"d-print-none","mt-8"],[2,"border-top-style","dotted","margin-bottom","5px"],[1,"page-break"]],template:function(i,e){if(i&1){let n=w();a(0,"mainpanel-cmp",1),f("textChange",function(C){return m(n),_(e.pageData().Filter.Number,C)||(e.pageData().Filter.Number=C),s(C)}),v("onSubmit",function(){return e.onFilter()}),f("filterChange",function(C){return m(n),_(e.pageData().Filter,C)||(e.pageData().Filter=C),s(C)}),a(1,"actions"),S(2,te,4,0,"button",2),a(3,"button",3),v("click",function(){return e.onNewPrint()}),g(4,"New"),r()(),a(5,"div",4),P(6,ie,21,14,"ng-template",null,0,O),r(),a(8,"content")(9,"div",5),S(10,re,2,0),r()()()}if(i&2){let n,u;l("pageData",e.menuData())("hideSearchBox",!0),h("text",e.pageData().Filter.Number)("filter",e.pageData().Filter),l("isFilterOnDropdown",!1),c(2),b(((n=e.receipts())==null||n.Data==null?null:n.Data.length)>0?2:-1),c(8),b((u=e.printTemplates()&&e.receipts())?10:-1,u)}},dependencies:[L,$,Z,K,J,Q,q,X,R,N,j,Y],styles:["input.p-inputtext{height:46.63px;border-color:#0000001f!important} input.p-inputtext :hover{border-color:#0000001f!important}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"],changeDetection:0})};export{ee as BulkInvoiceA4Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as H,G as z,a as R,e as F,f as j,g as U}from"./chunk-7OJUWRPB.js";import{b as Q}from"./chunk-DA5OOQPS.js";import{$b as w,Ca as b,Fa as _,Ib as r,Jb as a,Pa as I,Rb as h,Ub as M,Va as l,Vb as d,Zb as V,_b as P,ab as m,eb as T,ec as O,fc as S,hc as g,ic as p,ja as f,jc as D,ka as v,kc as L,lc as A,oa as y,tb as E,wa as C,xb as u,xc as N,za as x,zb as c,zc as k}from"./chunk-45TUMJS2.js";import{a as o}from"./chunk-NF7PG5F2.js";var W=class i{roleService=y(Q);productCodeType=b("code");columnsToDisplay=this.buildColumns();resetCodeTypes(){this.productCodeType.set("code"),this.columnsToDisplay.Hexacode.selected=!1}buildColumns(){return{Variant:{selected:!0,name:"Variant"},Code:{selected:!0,name:"Code"},Hexacode:{selected:!1,name:"Hexacode"},UnitCost:{selected:!0,name:"Buying Cost"},UnitPrice:{selected:!0,name:"Selling Price"},PriceMin:{selected:!1,name:"Minimum Price"},Percentage:{selected:!0,name:"%"},VariantType:{selected:!1,name:"Type"},Weight:{selected:!0,name:"Weight"},Inventory:{selected:!0,name:"Inventory"},Ratio:{selected:!1,name:"Ratio"},ReferenceUnit:{selected:!1,name:"Reference"}}}toggleColumn(e){let t=this.columnsToDisplay[e];t&&(t.selected=!t.selected)}getAvailableColumns(e=!1){let t=[];return t.push(o({key:"Code"},this.columnsToDisplay.Code)),this.columnsToDisplay.Hexacode.selected&&t.push(o({key:"Hexacode"},this.columnsToDisplay.Hexacode)),this.roleService.product?.Cost&&t.push(o({key:"UnitCost"},this.columnsToDisplay.UnitCost)),this.roleService.sell?.PriceVisible&&(t.push(o({key:"UnitPrice"},this.columnsToDisplay.UnitPrice)),e||t.push(o({key:"PriceMin"},this.columnsToDisplay.PriceMin))),t.push(o({key:"Percentage"},this.columnsToDisplay.Percentage),o({key:"Weight"},this.columnsToDisplay.Weight)),this.roleService.inventory?.View&&!e&&t.push(o({key:"Inventory"},this.columnsToDisplay.Inventory)),t.push(o({key:"VariantType"},this.columnsToDisplay.VariantType),o({key:"Ratio"},this.columnsToDisplay.Ratio),o({key:"ReferenceUnit"},this.columnsToDisplay.ReferenceUnit)),t}static \u0275fac=function(t){return new(t||i)};static \u0275prov=v({token:i,factory:i.\u0275fac,providedIn:"root"})};var Y=["input"],J=i=>({"form-floating-outline":i});function K(i,e){if(i&1&&(r(0,"label",3),p(1),a()),i&2){let t=d();h("htmlFor",t.inputId),l(),D(t.placeholder)}}function X(i,e){if(i&1&&(r(0,"div",4),p(1),a()),i&2){let t=d();l(),L(" ",t.errorMessage," ")}}function Z(i,e){if(i&1&&(r(0,"div",6)(1,"span",7),p(2),a()()),i&2){let t=d();g(t.value.length>=t.maxlength?"text-danger":""),O("font-weight",t.value.length>=t.maxlength?"bold":"normal"),l(2),A("",(t.value||"").length,"/",t.maxlength)}}var B=class i{constructor(e,t){this.controlContainer=e;this.injector=t}controlContainer;injector;autofocus=!1;maxlength=null;placeholder=null;type="text";inputId="pos-input-"+Math.random().toString(36).slice(2,8);inputName;floatingLabel=!0;customStyle=null;changeEvent=new x;_attachedControl=null;value="";disabled=!1;_maxlengthValidator=null;valid=!1;errorMessage="Invalid input.";onChange=()=>{};onTouched=()=>{};inputElement;writeValue(e){this.value=e==null?"":String(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}onInput(e){let t=e.target,n=t.value||"";this.maxlength!=null&&Number.isFinite(Number(this.maxlength))&&(n=n.slice(0,Number(this.maxlength)),t.value!==n&&(t.value=n)),this.value=n,this.onChange(this.value),this.changeEvent&&this.changeEvent.emit(n)}onBlur(){this.onTouched()}ngControl=null;ngAfterViewInit(){this.autofocus&&setTimeout(()=>{this.inputElement.nativeElement.focus()},200)}ngOnInit(){try{this.ngControl=this.injector.get(U,null)}catch(e){this.ngControl=null}if(this.ngControl)try{this.ngControl.valueAccessor=this}catch(e){}this.resolveAttachedControl(),this.applyMaxlengthToControl()}ngOnChanges(e){e.maxlength&&!e.maxlength.firstChange&&this.updateMaxlengthValidator(e.maxlength.previousValue,e.maxlength.currentValue)}ngOnDestroy(){this.removeMaxlengthFromControl()}applyMaxlengthToControl(){let e=this._attachedControl;e&&this.maxlength!=null&&this.maxlength!==void 0&&(this._maxlengthValidator=F.maxLength(Number(this.maxlength)),e.addValidators(this._maxlengthValidator),e.updateValueAndValidity({onlySelf:!0,emitEvent:!1}))}removeMaxlengthFromControl(){let e=this._attachedControl;e&&this._maxlengthValidator&&(e.removeValidators(this._maxlengthValidator),e.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._maxlengthValidator=null)}updateMaxlengthValidator(e,t){this.removeMaxlengthFromControl(),this.applyMaxlengthToControl()}resolveAttachedControl(){if(this.ngControl&&this.ngControl.control){this._attachedControl=this.ngControl.control;return}if(this.inputName&&this.controlContainer&&this.controlContainer.control)try{let e=this.controlContainer.control.get(this.inputName);e&&(this._attachedControl=e)}catch(e){console.error("error : ",e)}}static \u0275fac=function(t){return new(t||i)(m(j,9),m(C))};static \u0275cmp=T({type:i,selectors:[["POS-input-limit"]],viewQuery:function(t,n){if(t&1&&V(Y,5),t&2){let s;P(s=w())&&(n.inputElement=s.first)}},inputs:{autofocus:"autofocus",maxlength:"maxlength",placeholder:"placeholder",type:"type",inputId:"inputId",inputName:"inputName",floatingLabel:"floatingLabel",customStyle:"customStyle",valid:"valid",errorMessage:"errorMessage"},outputs:{changeEvent:"changeEvent"},features:[N([{provide:R,useExisting:f(()=>i),multi:!0}]),_],decls:6,vars:16,consts:[["input",""],[1,"input-limit-container"],[1,"form-control","input-core",3,"input","blur","id","placeholder","value","disabled"],[3,"for"],["aria-hidden","true",1,"invalid-feedback"],["aria-hidden","true",1,"limit-preview",3,"class","font-weight"],["aria-hidden","true",1,"limit-preview"],[1,"count"]],template:function(t,n){t&1&&(r(0,"div",1)(1,"input",2,0),M("input",function(q){return n.onInput(q)})("blur",function(){return n.onBlur()}),a(),u(3,K,2,2,"label",3),u(4,X,2,1,"div",4),u(5,Z,3,6,"div",5),a()),t&2&&(g(k(14,J,n.floatingLabel)),l(),S("is-invalid",(n.ngControl==null?null:n.ngControl.invalid)&&((n.ngControl==null?null:n.ngControl.touched)||(n.ngControl==null?null:n.ngControl.dirty))),h("id",n.inputId)("placeholder",n.placeholder)("value",n.value)("disabled",n.disabled),E("type",n.type)("maxlength",n.maxlength)("style",n.customStyle,I),l(2),c(n.floatingLabel?3:-1),l(),c(n.valid?4:-1),l(),c(n.maxlength!=null&&n.maxlength!==void 0?5:-1))},dependencies:[H,z],styles:[".input-limit-container[_ngcontent-%COMP%]{position:relative}.input-limit-container[_ngcontent-%COMP%] .input-core[_ngcontent-%COMP%]{box-sizing:border-box;min-width:0}.input-limit-container[_ngcontent-%COMP%] .limit-preview[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;padding-left:6px;color:#ccc;font-size:.87rem;border-left:1px solid rgba(0,0,0,.12);height:32px;line-height:32px;justify-content:center;background:#fff;z-index:5;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:33%}@media(max-width:576px){.input-limit-container[_ngcontent-%COMP%] .input-core[_ngcontent-%COMP%]{padding-right:88px}.input-limit-container[_ngcontent-%COMP%] .limit-preview[_ngcontent-%COMP%]{right:8px;min-width:56px;font-size:.8rem}}"]})};export{W as a,B as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-7WXDE6VO.js";import{a as w}from"./chunk-7Y7QIF3M.js";import{a as A}from"./chunk-B2PAUOAE.js";import{a as x}from"./chunk-TDPR34KX.js";import{a as I}from"./chunk-HDB7WDVX.js";import{a as c}from"./chunk-IZ6OEFHZ.js";import{a as l}from"./chunk-PPTZHIIZ.js";import{Ca as P,ea as L,oa as f,r as F,x as S}from"./chunk-45TUMJS2.js";import{a as y}from"./chunk-NF7PG5F2.js";var d=class{enabledDragItem;constructor(){this.enabledDragItem=!1}drop(o,t){A(t.Data,o.previousIndex,o.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.postListID(o,t.data.Data)}onPutSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.putListID(o,t.data.Data)}};var D=class{constructor(o){this.httpService=o}httpService;exportCSV(o,t,e,i){e.pageData.Filter.Export=!0,e.pageData.Filter.FormatType=0,i=i||"export.csv",this.httpService.post(`/api/${t}`,e.pageData.Filter).subscribe(r=>{o.convertToCSV(r,i),e.pageData.Filter.Export=!1})}convertToCSV(o,t=!1,e){let i=this.ExportDataFromUI2(t);o.convertToCSV(i,e)}ExportDataFromUI2(o=!1){let t=document.getElementById("tableGrid"),e=[];return l.IsNotEmpty(t)&&t.querySelectorAll("tr").forEach(r=>{let a=new Object,s=0;r.querySelectorAll("th, td").forEach(n=>{s++;let v=parseInt(n.getAttribute("colspan"));for(let u=1;u<v;u++)a["column"+s]="",s++;let p=n.innerText,h=p.toString().split("");if(o&&h[0]==="0"&&h.length>1){let u="'"+p.trim();a["column"+s]=u}else a["column"+s]=p.trim()}),e.push(a)}),e}};var b=class{listTotal;pageSize;show;constructor(){this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(o){this.pageSize=o.pageData.Filter.RowCount,this.listTotal=o.data?.ListTotal??o.data?.Data?.total?.value,this.show=this.pageSize<=this.listTotal}changePage(o,t,e){t.Filter.PageNumber=o.pageIndex+1,e.getListData()}};var M=class extends x{constructor(t,e,i,r,a,s,g,n="post",v="post"){super(t);this.httpService=e;this.dataAPI=i;this.pageAPI=r;this.toastrService=a;this.route=s;this.initOpenDialog=g;this.dataMethod=n;this.loaderMethod=v;this.exportHandler=new D(e),r?(s&&(this.loaderPayload=y({ListIDs:this.reportFilterService?.initOutletFilter()},s.snapshot.queryParams)),this.preInitLoader(),S([this.menuData$,this.callApi("/api/"+this.pageAPI,this.loaderPayload,this.loaderMethod)]).pipe(F(([p,h])=>h)).pipe(I()).subscribe(p=>{this.pageData=p,this.pageData.Filter||(this.pageData.Filter={},this.pageData.Filter.RowCount=20),this.pageData.Filter.PageNumber=1,this.pageData.Filter.ID=this.loaderPayload.ID,this.preInitList(),this.initOpenDialog?this.openDialogFilter.openDialog(this.getOpenDialogOptions()):this.getListData()})):(this.pageData.Filter.RowCount=20,this.pageData.Filter.PageNumber=1,this.preInitList(),S({menuData:this.menuData$,listData:this.getListData$()}).pipe(I()).subscribe())}httpService;dataAPI;pageAPI;toastrService;route;initOpenDialog;dataMethod;loaderMethod;openDialogFilter=f(w);reportFilterService=f(C);pageData={Filter:{},Options:{},Roles:{},Config:{}};data;pagination=new b;dragDrop=new d;exportHandler;comparation=0;loaderPayload={};reloadRowCount=P(!1);mapToKeyValueArray(t){return t?Object.keys(t).map(e=>({key:e,value:t[e]})):[]}callApi(t,e,i="post"){let r=t;if(i==="get"){let a=this.mapToKeyValueArray(e);return this.httpService.get(r,a)}return this.httpService[i](r,e)}preInitLoader(){}getOpenDialogOptions(){}preInitList(){}getListData(t){this.preGetList(),this.dataAPI&&this.callApi("/api/"+this.dataAPI,this.pageData.Filter,this.dataMethod).subscribe(e=>{e.PageSubTitle&&(this.menuData.SH=e.PageSubTitle),this.data=e,this.postInit(e),this.reloadRowCount.set(!0),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)})}getListData$(t){return this.preGetList(),this.callApi("/api/"+this.dataAPI,this.pageData.Filter,this.dataMethod).pipe(L(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)}))}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(t){t.PageTitle!=null&&(this.menuData.H=t.PageTitle)}preGetList(){this.pageData.Filter.From==null&&(this.pageData.Filter.From=l.MinDate),this.pageData.Filter.To==null&&(this.pageData.Filter.To=l.MinDate)}preSearchFromPageOne(){}onPaginationChange(t){this.pagination.changePage(t,this.pageData,this)}onSelectAllData(t){this.data.Data=this.data.Data.map(e=>(e.selected=t,e))}getSelectedData(){let t=[];return this.data&&(t=this.data.Data.filter(e=>e.selected)),t}httpPostListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.postListID(t,r,i)}httpPutListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.putListID(t,r,i)}httpDeleteListID(t,e,i){if(e||(e="Are you sure you want to delete selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.DeleteListID(t,r,i)}onSaveDragAndDrop(t){this.dragDrop.onSaveDragAndDrop(t,this)}onPutSaveDragAndDrop(t){this.dragDrop.onPutSaveDragAndDrop(t,this)}postListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.post(`/api/${t}`,r,1e6,!0).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,c.Success),this.getListData()},a=>{let s=a.status+" "+a.statusText;this.toastrService.error(a.error.Message!=""?a.error.Message:"An unknown error has occured!",s,{enableHtml:!0})})}putListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.put(`/api/${t}`,r).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,c.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.delete(`/api/${t}`,{body:r}).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,c.Success),this.getListData()})}postData(t,e){this.httpService.post("/API/"+t,e).subscribe(i=>{this.getListData(),this.toastrService.success(i.Message?i.Message:i,c.Success)})}compare(t,e,i){return(t<e?-1:1)*(i?1:-1)}exportCSV(t,e,i){this.exportHandler.exportCSV(t,e,this,i)}s2ab(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),r=0;r!=t.length;++r)i[r]=t.charCodeAt(r)&255;return e}exportXlsx(t,e){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${t}`,this.pageData.Filter).subscribe(i=>{e=decodeURI(e);let r=window.URL.createObjectURL(new Blob([this.s2ab(atob(i))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),a=document.createElement("a");a.href=r,a.setAttribute("download",e),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(r),a.remove()})}convertToCSV(t,e=!1,i){let r=this.exportHandler.ExportDataFromUI2(e);t.convertToCSV(r,i)}OnCompare(t){let e=t?this.data[t]:this.data;if(e.length<1)return;let i=Object.assign({},this.pageData.Filter);i.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),i.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/API/"+this.dataAPI,i).subscribe(r=>{let a=t?r[t]:r;this.comparation=0,e.forEach(s=>{s.PrevIndex="-",s.CurrentIndex="-",s.Increase="-";let g=a.filter(n=>n.EntityID==s.EntityID);if(s.CurrentIndex=s.Rank,g.length>0){let n=g[0];s.PrevIndex=n.Rank,n.SalesNet?s.Increase=(s.SalesNet-n.SalesNet)/n.SalesNet*100:n.Sales&&(s.Increase=(s.Sales-n.Sales)/n.Sales*100),s.IsPositive=s.Increase>0,s.IsNegative=s.Increase<0,this.comparation+=s.Increase}})})}};export{M as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-HDB7WDVX.js";import{a as C}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-HDB7WDVX.js";import{a as C}from"./chunk-ZZW5Y2VY.js";import{Ca as d,Ib as b,Jb as g,Kb as S,Pc as _,Qb as y,Ub as v,Vb as i,eb as f,fa as s,fc as T,ka as a,oa as r,sa as p,ta as m,xb as u,y as c,zb as h}from"./chunk-45TUMJS2.js";var t=class e{_scrollY=d(0);scrollY=this._scrollY.asReadonly();showScrollTop=_(()=>this._scrollY()>300);constructor(){c(window,"scroll",{passive:!0}).pipe(s(100),w()).subscribe(()=>{this._scrollY.set(window.scrollY)})}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}static \u0275fac=function(o){return new(o||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})};function I(e,n){if(e&1){let o=y();b(0,"button",1),v("click",function(){p(o);let D=i();return m(D.scrollTopService.scrollToTop())}),S(1,"i",2),g()}if(e&2){let o=i();T("isIntercomLauncherShown",o.isLauncherHidden()===!1)}}var x=class e{scrollTopService=r(t);intercomService=r(C);isLauncherHidden=this.intercomService.isLauncherHidden;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=f({type:e,selectors:[["POS-scroll-top"]],decls:1,vars:1,consts:[["aria-label","Scroll to top",1,"scroll-top-btn",3,"isIntercomLauncherShown"],["aria-label","Scroll to top",1,"scroll-top-btn",3,"click"],[1,"fa-regular","fa-arrow-up-long-to-line"]],template:function(o,l){o&1&&u(0,I,2,2,"button",0),o&2&&h(l.scrollTopService.showScrollTop()?0:-1)},styles:["[_nghost-%COMP%]{display:contents}.scroll-top-btn[_ngcontent-%COMP%]{position:fixed;bottom:1.5rem;right:1.5rem;display:inline-flex;align-items:center;justify-content:center;width:2.6rem;height:2.6rem;border:1px solid #0071b2;border-radius:8px;background:#fff;color:#0071b2;font-size:1rem;cursor:pointer;box-shadow:0 2px 6px #0000001f;transition:all .15s ease;z-index:1000}.scroll-top-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{line-height:1;pointer-events:none}.scroll-top-btn.isIntercomLauncherShown[_ngcontent-%COMP%]{bottom:5rem!important}"],changeDetection:0})};export{x as a};
|