mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 09:50:36 +01:00
1 line
2.8 MiB
JavaScript
1 line
2.8 MiB
JavaScript
|
(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[315],{6315:(zc,Lr,Rt)=>{"use strict";Rt.r(Lr),Rt.d(Lr,{CLNModule:()=>uw});var rt=Rt(6895),ge=Rt(9116),S=Rt(8878),A=Rt(4650),n=Rt(1576),B=Rt(3162);function o(i,Q){1&i&&A._UZ(0,"mat-progress-bar",3)}let s=(()=>{class i{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(r=>{switch(!0){case r instanceof ge.OD:this.loading=!0;break;case r instanceof ge.m2:case r instanceof ge.gk:case r instanceof ge.Q3:this.loading=!1}})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(ge.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,r){1&t&&(A.TgZ(0,"div",0),A.YNc(1,o,1,0,"mat-progress-bar",1),A._UZ(2,"router-outlet",null,2),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",r.loading))},dependencies:[rt.O5,n.xw,n.Wh,n.yH,B.pW,ge.lC],data:{animation:[S.g]}}),i})();var l=Rt(7579),c=Rt(2722),u=Rt(1365),C=Rt(3396),f=Rt(2687),a=Rt(7731),h=Rt(9828),w=Rt(5043),E=Rt(9653),e=Rt(62),g=Rt(2216),d=Rt(5829),M=Rt(4859),T=Rt(3546),y=Rt(782),p=Rt(7392),v=Rt(8255),D=Rt(3848),b=Rt(9300),Y=Rt(8739),U=Rt(6308),x=Rt(671),J=Rt(5412),nA=Rt(429),gA=Rt(493),G=Rt(4006),lA=Rt(4144),cA=Rt(9549),hA=Rt(4385),mA=Rt(3238),QA=Rt(455),xA=Rt(266),yA=Rt(3390),k=Rt(6534);function BA(i,Q){if(1&i&&(A.TgZ(0,"mat-option",27),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&i){const t=Q.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(A.lcZ(2,2,t))}}function eA(i,Q){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.invoiceError)}}function oA(i,Q){if(1&i&&(A.TgZ(0,"div",28),A._UZ(1,"fa-icon",29),A.YNc(2,eA,2,1,"span",30),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.invoiceError)}}let DA=(()=>{class i{constructor(t,r,I,fA,nt,Gt){this.dialogRef=t,this.data=r,this.store=I,this.decimalPipe=fA,this.commonService=nt,this.actions=Gt,this.faExclamationTriangle=f.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.timeUnitEnum=a.Qk,this.timeUnits=a.LO,this.selTimeUnit=a.Qk.SECS,this.invoiceError="",this.unSubs=[new l.x,new l.x,new l.x,new l.x,new l.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(h.lw).pipe((0,c.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.ey).pipe((0,c.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,c.R)(this.unSubs[2]),(0,b.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===t.payload.action&&(t.payload.status===a.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let r=this.expiry?this.expiry:a.$Y;this.selTimeUnit!==a.Qk.SECS&&this.expiry&&(r=this.commonService.convertTime(this.expiry,this.selTimeUnit,a.Qk.SECS)),this.store.dispatch((0,nA.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:r,private:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=a.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,c.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Erro
|