mirror of
https://github.com/openMF/web-app.git
synced 2026-02-06 10:48:19 +00:00
2 lines
99 KiB
JavaScript
2 lines
99 KiB
JavaScript
import{$c as Y,$d as be,Ac as ft,Ad as Si,Ae as Ti,Af as Re,Bc as St,Cc as He,Cd as Ci,Da as y,Db as Xe,Dc as Ct,Dd as X,Df as qe,Ea as E,Eb as T,Ec as vt,Ed as ue,Fc as _t,G as Oe,Ga as R,Gc as At,Gg as Mt,H as mt,Hd as he,Ia as b,Id as Z,If as Di,Ja as A,Jd as Ze,Jf as yi,K as f,Kc as pi,Kd as fe,Kf as Ei,L as I,Lc as P,Ld as et,M,Na as ee,Nb as ut,Nd as tt,Oa as te,Pa as ie,Pd as je,Pg as Bi,Qa as F,Qb as si,Qd as Se,Rd as Ce,Rg as ki,Sc as ne,Sd as ve,T as pt,Tc as j,Td as vi,Ua as s,Ud as Fe,Va as l,Wa as S,Wd as Ve,We as it,Xa as w,Xd as gt,Yc as re,Zc as G,_c as oe,_f as It,ag as Ii,bb as L,bd as li,ca as t,ce as _i,da as lt,de as bt,dg as Mi,eb as O,ed as J,ef as at,eg as rt,fb as ri,fd as di,ff as xt,fg as ot,gc as B,gg as Pi,hb as o,hc as ci,hd as se,hf as Tt,hg as wi,ib as c,if as Dt,ja as x,jb as ae,jc as Q,jf as yt,ka as dt,kb as oi,kc as W,kd as ce,ke as Ai,kf as Et,lb as _e,lc as mi,le as gi,lf as nt,mc as ti,me as bi,mf as Le,na as C,nd as me,nf as xe,of as Te,pc as ht,pf as De,qb as Je,qc as N,ra as v,rd as pe,re as xi,rf as ye,sa as _,sd as ui,sf as Ee,ta as Be,td as D,ua as ke,ud as le,uf as Ie,va as Ne,vd as hi,vf as Me,vg as Ri,wa as d,wd as fi,xa as a,xd as de,xf as Pe,ya as n,yf as we,yg as Fi,za as h,zd as ge}from"./chunk-YXYDMGAY.js";import{a as H,b as K}from"./chunk-PHUH23IY.js";var k=(()=>{class e{constructor(){this.http=f(si)}getSharesAccountData(i,m){let r=new ut().set("template",m.toString());return this.http.get(`/accounts/share/${i}`,{params:r})}getSharesAccountTemplate(i,m){let r=new ut().set("clientId",i);return r=m?r.set("productId",m):r,this.http.get("/accounts/share/template",{params:r})}createSharesAccount(i){return this.http.post("/accounts/share",i)}updateSharesAccount(i,m){return this.http.put(`/accounts/share/${i}`,m)}deleteSharesAccount(i){return this.http.delete(`/accounts/share/${i}`)}executeSharesAccountCommand(i,m,r){let u=new ut().set("command",m);return this.http.post(`/accounts/share/${i}`,r,{params:u})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Pt=class{constructor(p){this.setOptions(p),this.setButtons(p)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(p){switch(p){case"Active":this.buttonsArray=[{name:"Apply Additional Shares",icon:"arrow-right",taskPermissionName:"APPLYADDITIONAL_SHAREACCOUNT"},{name:"Approve Additional Shares",icon:"arrow-right",taskPermissionName:"APPROVEADDITIONAL_SHAREACCOUNT"},{name:"Reject Additional Shares",icon:"arrow-left",taskPermissionName:"REJECTADDITIONAL_SHAREACCOUNT"},{name:"Redeem Shares",icon:"arrow-left",taskPermissionName:"WITHDRAW_SAVINGSACCOUNT"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"pencil",taskPermissionName:"UPDATE_SHAREACCOUNT"},{name:"Approve",icon:"check",taskPermissionName:"APPROVE_SHAREACCOUNT"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"undo",taskPermissionName:"APPROVALUNDO_SHAREACCOUNT"},{name:"Activate",icon:"check",taskPermissionName:"ACTIVATE_SHAREACCOUNT"}];break;default:this.buttonsArray=[]}}setOptions(p){switch(p){case"Active":this.optionArray=[{name:"Close",taskPermissionName:"CLOSE_SHAREACCOUNT"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject",taskPermissionName:"REJECT_SHAREACCOUNT"},{name:"Delete",taskPermissionName:"DELETE_SHAREACCOUNT"}];break;case"Approved":default:this.optionArray=[]}}addOption(p){this.optionArray.push(p)}removeButton(p){let m=this.buttonsArray.map(r=>r.name).indexOf(p);this.buttonsArray.splice(m,1)}};var Hi=()=>["./general"],ji=()=>["./transactions"],Li=()=>["./charges"],Ui=()=>["./dividends"];function $i(e,p){if(e&1&&(a(0,"span",21),h(1,"mifosx-account-number",30),n()),e&2){let i=A();t(),d("accountNo",L(i.sharesAccountData.clientAccountNo))}}function Gi(e,p){if(e&1&&(a(0,"tr")(1,"td"),s(2),o(3,"translate"),n(),a(4,"td"),s(5),o(6,"translateKey"),n()()),e&2){let i=A();t(2),S("",c(3,3,"labels.inputs.Lockin Period")," :"),t(3),w(" ",i.sharesAccountData.lockinPeriod," ",ae(6,5,i.sharesAccountData.lockPeriodTypeEnum.value,"catalogs")," ")}}function zi(e,p){if(e&1&&(a(0,"button",25)(1,"mat-icon",31),h(2,"fa-icon",32),n()()),e&2){A();let i=F(42);d("matMenuTriggerFor",i)}}function Qi(e,p){if(e&1){let i=R();a(0,"button",34),b("click",function(){I(i);let r=A().$implicit,u=A();return M(u.doAction(r.name))}),a(1,"mat-icon",35),h(2,"fa-icon",36),n(),a(3,"span"),s(4),o(5,"translate"),n()()}if(e&2){let i=A().$implicit;t(2),d("icon",L(i.icon)),t(2),l(c(5,3,"labels.menus."+i.name))}}function Ki(e,p){if(e&1&&C(0,Qi,6,5,"button",33),e&2){let i=p.$implicit;d("mifosxHasPermission",i.taskPermissionName)}}function Wi(e,p){if(e&1){let i=R();a(0,"button",34),b("click",function(){I(i);let r=A().$implicit,u=A(2);return M(u.doAction(r.name))}),s(1),o(2,"translate"),n()}if(e&2){let i=A().$implicit;t(),S(" ",c(2,1,"labels.menus."+i.name)," ")}}function Yi(e,p){if(e&1&&(a(0,"span"),C(1,Wi,3,3,"button",33),n()),e&2){let i=p.$implicit;t(),d("mifosxHasPermission",i.taskPermissionName)}}function Ji(e,p){if(e&1&&(a(0,"button",37),s(1),o(2,"translate"),n(),a(3,"mat-menu",null,2),ke(5,Yi,2,1,"span",null,Be),n()),e&2){let i=F(4),m=A();d("matMenuTriggerFor",i),t(),l(c(2,2,"labels.menus.More")),t(4),Ne(m.buttonConfig.options)}}function Xi(e,p){if(e&1&&(a(0,"a",38,3),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Hi))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.General")," ")}}function Zi(e,p){if(e&1&&(a(0,"a",38,4),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,ji))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Transactions")," ")}}function ea(e,p){if(e&1&&(a(0,"a",38,5),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Li))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Charges")," ")}}function ta(e,p){if(e&1&&(a(0,"a",38,6),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Ui))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Dividends")," ")}}var Rt=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.sharesService=f(k),this.dialog=f(He),this.route.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData})}ngOnInit(){this.setConditionalButtons(),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}setConditionalButtons(){let i=this.sharesAccountData.status.value;if(this.buttonConfig=new Pt(i),this.sharesAccountData.charges&&this.sharesAccountData.charges.forEach(r=>{r.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Anuual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),i==="Active"){let m=this.sharesAccountData.purchasedShares,r=!1;m.forEach(u=>{u.status.code==="purchasedSharesStatusType.applied"&&u.type.code==="purchasedSharesType.purchased"&&(r=!0)}),r||(this.buttonConfig.removeButton("Approve Additional Shares"),this.buttonConfig.removeButton("Reject Additional Shares"))}}doAction(i){switch(i){case"Approve":case"Reject":case"Close":case"Activate":case"Undo Approval":case"Apply Additional Shares":case"Redeem Shares":case"Approve Additional Shares":case"Reject Additional Shares":this.router.navigate([`actions/${i}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteSharesAccount();break}}deleteSharesAccount(){this.dialog.open(bt,{data:{deleteContext:`shares account with id: ${this.sharesAccountData.id}`}}).afterClosed().subscribe(m=>{m.delete&&this.sharesService.deleteSharesAccount(this.sharesAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-view"]],decls:55,vars:37,consts:[["accountMenu","matMenu"],["tabPanel",""],["More","matMenu"],["general","routerLinkActive"],["transactions","routerLinkActive"],["charges","routerLinkActive"],["dividends","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","","src","assets/images/shares_account_placeholder.png",1,"profile-image",3,"matTooltip"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"shares-overview"],[1,"m-r-10"],[1,"m-l-10"],[1,"account-overview"],[1,"flex-auto"],[1,"flex-40"],["mat-icon-button","","aria-label","Share account actions","yPosition","below",3,"matMenuTriggerFor"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[3,"accountNo"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"]],template:function(m,r){if(m&1&&(a(0,"mat-card",7)(1,"mat-card-header",8)(2,"mat-card-title-group",9)(3,"div",10)(4,"div"),h(5,"img",11),o(6,"translate"),n()(),a(7,"div",12)(8,"mat-card-title")(9,"div",13)(10,"div",14)(11,"h3"),h(12,"i",15),o(13,"statusLookup"),a(14,"span",16),s(15),o(16,"translate"),n(),a(17,"span",16),h(18,"mifosx-long-text",17),n(),h(19,"mifosx-account-number",18),n(),a(20,"span",19)(21,"span",20),s(22),o(23,"translate"),o(24,"translate"),n(),s(25),v(26,$i,2,2,"span",21),n(),a(27,"div")(28,"table",22)(29,"tbody")(30,"tr")(31,"td"),s(32),o(33,"translate"),n(),a(34,"td"),s(35),o(36,"formatNumber"),n()(),v(37,Gi,7,8,"tr"),n()()()(),h(38,"span",23),a(39,"div",24),v(40,zi,3,1,"button",25),n()()()()(),a(41,"mat-menu",null,0),ke(43,Ki,1,1,"button",26,Be),v(45,Ji,7,4),n()(),a(46,"mat-card-content",27)(47,"nav",28),C(48,Xi,4,6,"a",29)(49,Zi,4,6,"a",29)(50,ea,4,6,"a",29)(51,ta,4,6,"a",29),n(),a(52,"mat-tab-nav-panel",null,1),h(54,"router-outlet"),n()()()),m&2){let u=F(53);t(5),d("matTooltip",L(c(6,23,"tooltips.Shares Account"))),t(7),d("ngClass",c(13,25,r.sharesAccountData.status.code))("matTooltip",r.sharesAccountData.status.value),t(3),S("",c(16,27,"labels.inputs.Share Product")," :"),t(3),d("textValue",L(r.sharesAccountData.productName)),t(),d("accountNo",L(r.sharesAccountData.accountNo)),t(3),w("",c(23,29,"labels.text."+r.entityType)," ",c(24,31,"labels.inputs.name")," :"),t(3),S("",r.sharesAccountData.clientName||r.sharesAccountData.groupName," "),t(),_(r.sharesAccountData.clientAccountNo?26:-1),t(6),S("",c(33,33,"labels.inputs.Current Market Price")," :"),t(3),l(c(36,35,r.sharesAccountData.currentMarketPrice)),t(2),_(r.sharesAccountData.lockinPeriod?37:-1),t(3),_(r.buttonConfig.singleButtons.length>0?40:-1),t(3),Ne(r.buttonConfig.singleButtons),t(2),_(r.buttonConfig.options.length?45:-1),t(2),d("tabPanel",u),t(),d("mifosxHasPermission","READ_SHAREACCOUNTPURCHASE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTPURCHASE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTCHARGE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTDIVIDENDS")}},dependencies:[T,Je,D,W,le,de,gt,Si,fi,Ci,je,hi,Bi,Mt,ht,bi,xi,be,gi,Ai,Di,yi,mi,Ei,ci,P,Ve,ot,rt],styles:[".shares-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:60%;font-weight:400}"]})}}return e})();function ia(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function aa(e,p){if(e&1&&(a(0,"td",15),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function na(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Type")))}function ra(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit;t(),w(" ",i.type.value," ",i.type.value!=="Charge Payment"?"("+i.status.value+")":""," ")}}function oa(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function sa(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function ca(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Purhcased/Redeemed Price")))}function ma(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.purchasedPrice," ")}}function pa(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Charge Amount")))}function la(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.type.value==="Charge Payment"?i.amount:i.chargeAmount," ")}}function da(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount Recieved/Returned")))}function ua(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.amount," ")}}function ha(e,p){e&1&&h(0,"tr",16)}function fa(e,p){e&1&&h(0,"tr",17)}var Ft=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["transactionDate","transactionType","totalShares","purchasedOrRedeemedPrice","chargeAmount","amountRecievedOrReturned"],this.route.parent.data.subscribe(i=>{this.shareAccountData=i.sharesAccountData,this.transactionsData=this.shareAccountData.purchasedShares})}ngOnInit(){this.dataSource=new qe(this.transactionsData)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-transactions-tab"]],decls:27,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","transactionType"],["matColumnDef","totalShares"],["matColumnDef","purchasedOrRedeemedPrice"],["matColumnDef","chargeAmount"],["matColumnDef","amountRecievedOrReturned"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,ia,3,3,"th",5)(9,aa,3,3,"td",6),E(),y(10,7),C(11,na,3,3,"th",5)(12,ra,2,2,"td",6),E(),y(13,8),C(14,oa,3,3,"th",5)(15,sa,2,1,"td",6),E(),y(16,9),C(17,ca,3,3,"th",5)(18,ma,2,2,"td",6),E(),y(19,10),C(20,pa,3,3,"th",5)(21,la,2,2,"td",6),E(),y(22,11),C(23,da,3,3,"th",5)(24,ua,2,2,"td",6),E(),C(25,ha,1,0,"tr",12)(26,fa,1,0,"tr",13),n()()()),m&2&&(t(3),l(c(4,4,"labels.heading.All Transactions")),t(3),d("dataSource",r.dataSource),t(19),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Fe,P],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();function Sa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function Ca(e,p){if(e&1&&(a(0,"td",18),s(1),n()),e&2){let i=p.$implicit;t(),l(i.name)}}function va(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Fee/Penalty")))}function _a(e,p){if(e&1&&(a(0,"td",18),s(1),n()),e&2){let i=p.$implicit;t(),l(i.penalty===!0?"Penalty":"Fee")}}function Aa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Payment Due At")))}function ga(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),l(ae(2,1,i.chargeTimeType.value,"catalogs"))}}function ba(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Calculation Type")))}function xa(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),l(ae(2,1,i.chargeCalculationType.value,"catalogs"))}}function Ta(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Due")))}function Da(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function ya(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Paid")))}function Ea(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountPaid,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Ia(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Waived")))}function Ma(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountWaived,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Pa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Outstanding")))}function wa(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountOutstanding,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Ra(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Actions")))}function Fa(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.editCharge(u))}),h(2,"i",22),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Edit Charge")))}function Ba(e,p){if(e&1){let i=R();a(0,"button",23),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.deleteCharge(u.id))}),h(2,"i",24),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Delete Charge")))}function ka(e,p){e&1&&(a(0,"span"),C(1,Fa,3,4,"button",19)(2,Ba,3,4,"button",20),n()),e&2&&(t(),d("mifosxHasPermission","UPDATE_SHARESACCOUNTCHARGE"),t(),d("mifosxHasPermission","DELETE_SHARESACCOUNTCHARGE"))}function Na(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.payCharge(u.id))}),h(2,"i",25),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Pay Charge")))}function Oa(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.waiveCharge(u.id))}),h(2,"i",26),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Waive Charge")))}function Va(e,p){e&1&&(a(0,"span"),C(1,Na,3,4,"button",19)(2,Oa,3,4,"button",19),n()),e&2&&(t(),d("mifosxHasPermission","PAY_SHARESACCOUNTCHARGE"),t(),d("mifosxHasPermission","WAIVE_SHARESACCOUNTCHARGE"))}function qa(e,p){if(e&1&&(a(0,"td",18),v(1,ka,3,2,"span"),v(2,Va,3,2,"span"),n()),e&2){let i=A();t(),_(i.sharesAccountData.status.value==="Submitted and pending approval"?1:-1),t(),_(i.sharesAccountData.status.value==="Active"?2:-1)}}function Ha(e,p){e&1&&h(0,"tr",27)}function ja(e,p){e&1&&h(0,"tr",28)}var Bt=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["name","feeOrPenalty","paymentDueAt","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData,this.chargesData=this.sharesAccountData.charges})}ngOnInit(){let i=this.chargesData?this.chargesData.filter(m=>m.isActive):[];this.dataSource=new qe(i)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-charges-tab"]],decls:36,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,Sa,3,3,"th",5)(9,Ca,2,1,"td",6),E(),y(10,7),C(11,va,3,3,"th",5)(12,_a,2,1,"td",6),E(),y(13,8),C(14,Aa,3,3,"th",5)(15,ga,3,4,"td",6),E(),y(16,9),C(17,ba,3,3,"th",5)(18,xa,3,4,"td",6),E(),y(19,10),C(20,Ta,3,3,"th",5)(21,Da,3,6,"td",6),E(),y(22,11),C(23,ya,3,3,"th",5)(24,Ea,3,6,"td",6),E(),y(25,12),C(26,Ia,3,3,"th",5)(27,Ma,3,6,"td",6),E(),y(28,13),C(29,Pa,3,3,"th",5)(30,wa,3,6,"td",6),E(),y(31,14),C(32,Ra,3,3,"th",5)(33,qa,3,2,"td",6),E(),C(34,Ha,1,0,"tr",15)(35,ja,1,0,"tr",16),n()()()),m&2&&(t(3),l(c(4,4,"labels.heading.All Charges")),t(3),d("dataSource",r.dataSource),t(28),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,N,gt,xe,ye,De,Ee,Te,Ie,je,Me,we,Pe,Re,Xe,P,Ve],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();function La(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function Ua(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.postedDate))}}function $a(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function Ga(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit,m=A();t(),S(" ",_e(2,1,i.amount,m.shareAccountData.currency.code,"symbol-narrow","1.2-2")," ")}}function za(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Reference")))}function Qa(e,p){if(e&1&&(a(0,"td",13),s(1),n()),e&2){let i=p.$implicit;t(),l(i.savingsTransactionId)}}function Ka(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Wa(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"translate"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,"labels.status."+i.status.value))}}function Ya(e,p){e&1&&h(0,"tr",14)}function Ja(e,p){e&1&&h(0,"tr",15)}var kt=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["transactionDate","amount","transactionReference","status"],this.route.parent.data.subscribe(i=>{this.shareAccountData=i.sharesAccountData,this.dividendsData=this.shareAccountData.dividends})}ngOnInit(){this.dataSource=new qe(this.dividendsData)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-dividends-tab"]],decls:21,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["matColumnDef","transactionReference"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,La,3,3,"th",5)(9,Ua,3,3,"td",6),E(),y(10,7),C(11,$a,3,3,"th",5)(12,Ga,3,6,"td",6),E(),y(13,8),C(14,za,3,3,"th",5)(15,Qa,2,1,"td",6),E(),y(16,9),C(17,Ka,3,3,"th",5)(18,Wa,3,3,"td",6),E(),C(19,Ya,1,0,"tr",10)(20,Ja,1,0,"tr",11),n()()()),m&2&&(t(3),l(c(4,4,"labels.inputs.Dividends")),t(3),d("dataSource",r.dataSource),t(13),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Xe,Fe,P],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();function Xa(e,p){if(e&1&&(a(0,"mat-option",5),s(1),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",i.name," ")}}var Ge=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.sharesAccountProductTemplate=new lt,this.createSharesAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.sharesAccountTemplate&&(this.productData=this.sharesAccountTemplate.productOptions,this.sharesAccountTemplate.productId&&this.sharesAccountDetailsForm.patchValue({productId:this.sharesAccountTemplate.productId,submittedDate:this.sharesAccountTemplate.timeline.submittedOnDate&&new Date(this.sharesAccountTemplate.timeline.submittedOnDate),externalId:this.sharesAccountTemplate.externalId}))}createSharesAccountDetailsForm(){this.sharesAccountDetailsForm=this.formBuilder.group({productId:["",G.required],submittedDate:["",G.required],externalId:[""]})}buildDependencies(){let i=this.sharesAccountTemplate.clientId;this.sharesAccountDetailsForm.get("productId").valueChanges.subscribe(m=>{this.sharesService.getSharesAccountTemplate(i,m).subscribe(r=>{this.sharesAccountProductTemplate.emit(r)})})}get sharesAccountDetails(){return this.sharesAccountDetailsForm.value}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-details-step"]],inputs:{sharesAccountTemplate:"sharesAccountTemplate"},outputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate"},decls:45,vars:39,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","externalId"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"]],template:function(m,r){if(m&1){let u=R();a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),s(4),o(5,"translate"),n(),a(6,"mat-select",4),ke(7,Xa,2,2,"mat-option",5,Be),n(),a(9,"mat-error"),s(10),o(11,"translate"),o(12,"translate"),a(13,"strong"),s(14),o(15,"translate"),n()()(),a(16,"mat-form-field",6),b("click",function(){I(u);let q=F(23);return M(q.open())}),a(17,"mat-label"),s(18),o(19,"translate"),n(),h(20,"input",7)(21,"mat-datepicker-toggle",8)(22,"mat-datepicker",null,0),a(24,"mat-error"),s(25),o(26,"translate"),o(27,"translate"),a(28,"strong"),s(29),o(30,"translate"),n()()(),a(31,"mat-form-field",3)(32,"mat-label"),s(33),o(34,"translate"),n(),h(35,"input",9),n()(),a(36,"div",10)(37,"button",11),h(38,"fa-icon",12),s(39),o(40,"translate"),n(),a(41,"button",13),s(42),o(43,"translate"),h(44,"fa-icon",14),n()()()}if(m&2){let u,g=F(23);d("formGroup",r.sharesAccountDetailsForm),t(4),l(c(5,17,"labels.inputs.Product Name")),t(3),Ne(r.productData),t(3),w(" ",c(11,19,"labels.inputs.Product Name")," ",c(12,21,"labels.commons.is")," "),t(4),l(c(15,23,"labels.commons.required")),t(4),l(c(19,25,"labels.inputs.Submitted On")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",g),t(),d("for",g),t(4),w(" ",c(26,27,"labels.inputs.Submission Date")," ",c(27,29,"labels.commons.is")," "),t(4),l(c(30,31,"labels.commons.required")),t(4),l(c(34,33,"labels.inputs.External ID")),t(6),S(" ",c(40,35,"labels.buttons.Previous")," "),t(2),d("disabled",!((u=r.sharesAccountDetailsForm.get("productId"))!=null&&u.value&&((u=r.sharesAccountDetailsForm.get("submittedDate"))!=null&&u.value))),t(),S(" ",c(43,37,"labels.buttons.Next")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,Z,X,ue,he,fe,tt,et,Ce,ve,Se,N,Le,be,nt,P],encapsulation:2})}}return e})();function Za(e,p){if(e&1&&(a(0,"span",3),s(1),o(2,"currency"),n()),e&2){let i=A();t(),l(_e(2,1,i.calculateCurrenValue(),i.currency.code,"symbol-narrow","1.2-2"))}}function en(e,p){if(e&1&&(a(0,"mat-option",8),s(1),n()),e&2){let i=p.$implicit;d("value",i.id),t(),w(" ",i.accountNo," - ",i.savingsProductName," ")}}function tn(e,p){if(e&1&&(a(0,"mat-option",8),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",ae(2,2,i.value,"catalogs")," ")}}function an(e,p){if(e&1&&(a(0,"mat-option",8),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",ae(2,2,i.value,"catalogs")," ")}}var ze=(()=>{class e{constructor(){this.formBuilder=f(pe),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isSavingsPatched=!1,this.currency=null,this.createSharesAccountTermsForm()}ngOnChanges(){this.sharesAccountProductTemplate&&(this.currency=this.sharesAccountProductTemplate.currency,this.sharesAccountTermsForm.patchValue({currencyCode:this.sharesAccountProductTemplate.currency.code,decimal:this.sharesAccountProductTemplate.currency.decimalPlaces,currencyMultiple:this.sharesAccountProductTemplate.currency.inMultiplesOf,unitPrice:this.sharesAccountProductTemplate.currentMarketPrice,savingsAccountId:""}),this.setOptions(),this.sharesAccountTemplate&&!this.isSavingsPatched&&this.sharesAccountTemplate.savingsAccountId&&(this.sharesAccountTermsForm.get("savingsAccountId").patchValue(this.sharesAccountTemplate.savingsAccountId),this.isSavingsPatched=!0))}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.sharesAccountTemplate&&this.sharesAccountTermsForm.patchValue({requestedShares:this.sharesAccountTemplate.summary.totalPendingForApprovalShares,minimumActivePeriod:this.sharesAccountTemplate.minimumActivePeriod,minimumActivePeriodFrequencyType:this.sharesAccountTemplate.minimumActivePeriod&&this.sharesAccountTemplate.minimumActivePeriodTypeEnum.id,lockinPeriodFrequency:this.sharesAccountTemplate.lockinPeriod,lockinPeriodFrequencyType:this.sharesAccountTemplate.lockinPeriod&&this.sharesAccountTemplate.lockPeriodTypeEnum.id,applicationDate:this.sharesAccountTemplate.purchasedShares[0].purchasedDate&&new Date(this.sharesAccountTemplate.purchasedShares[0].purchasedDate),allowDividendCalculationForInactiveClients:this.sharesAccountTemplate.allowDividendCalculationForInactiveClients})}createSharesAccountTermsForm(){this.sharesAccountTermsForm=this.formBuilder.group({currencyCode:[{value:"",disabled:!0}],decimal:[{value:"",disabled:!0}],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}],currencyMultiple:[{value:"",disabled:!0}],savingsAccountId:["",G.required],minimumActivePeriod:[""],minimumActivePeriodFrequencyType:[""],lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],applicationDate:["",G.required],allowDividendCalculationForInactiveClients:[!1]})}setOptions(){this.minimumActivePeriodFrequencyTypeData=this.sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions,this.lockinPeriodFrequencyTypeData=this.sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.savingsAccountsData=this.sharesAccountProductTemplate.clientSavingsAccounts}get sharesAccountTerms(){return this.sharesAccountTermsForm.value}calculateCurrenValue(){return this.sharesAccountTermsForm.value.requestedShares&&this.sharesAccountProductTemplate.currentMarketPrice?this.sharesAccountProductTemplate.currentMarketPrice*this.sharesAccountTermsForm.value.requestedShares:0}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-terms-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate"},features:[pt],decls:96,vars:75,consts:[["applicationDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2percent","responsive-column","align-start-center"],[1,"flex-48"],["matInput","","formControlName","currencyCode"],["type","number","matInput","","formControlName","unitPrice"],["type","number","matInput","","formControlName","requestedShares","required",""],["formControlName","savingsAccountId","required",""],[3,"value"],[1,"flex-48",3,"click"],["matInput","","formControlName","applicationDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","allowDividendCalculationForInactiveClients",1,"flex-48"],[1,"mat-h4","flex-98"],["type","number","matInput","","formControlName","minimumActivePeriod"],["formControlName","minimumActivePeriodFrequencyType"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(m,r){if(m&1){let u=R();a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),s(4),o(5,"translate"),n(),h(6,"input",4),n(),a(7,"mat-form-field",3)(8,"mat-label"),s(9),o(10,"translate"),n(),h(11,"input",5),n(),a(12,"mat-form-field",3)(13,"mat-label"),s(14),o(15,"translate"),n(),h(16,"input",6),a(17,"mat-error"),s(18),o(19,"translate"),o(20,"translate"),a(21,"strong"),s(22),o(23,"translate"),n()()(),v(24,Za,3,6,"span",3),a(25,"mat-form-field",3)(26,"mat-label"),s(27),o(28,"translate"),n(),a(29,"mat-select",7),ke(30,en,2,3,"mat-option",8,Be),n(),a(32,"mat-error"),s(33),o(34,"translate"),o(35,"translate"),a(36,"strong"),s(37),o(38,"translate"),n()()(),a(39,"mat-form-field",9),b("click",function(){I(u);let q=F(46);return M(q.open())}),a(40,"mat-label"),s(41),o(42,"translate"),n(),h(43,"input",10)(44,"mat-datepicker-toggle",11)(45,"mat-datepicker",null,0),a(47,"mat-error"),s(48),o(49,"translate"),o(50,"translate"),a(51,"strong"),s(52),o(53,"translate"),n()()(),a(54,"mat-checkbox",12),s(55),o(56,"translate"),n(),a(57,"h4",13),s(58),o(59,"translate"),n(),a(60,"mat-form-field",3)(61,"mat-label"),s(62),o(63,"translate"),n(),h(64,"input",14),n(),a(65,"mat-form-field",3)(66,"mat-label"),s(67),o(68,"translate"),n(),a(69,"mat-select",15),ke(70,tn,3,5,"mat-option",8,Be),n()(),a(72,"h4",13),s(73),o(74,"translate"),n(),a(75,"mat-form-field",3)(76,"mat-label"),s(77),o(78,"translate"),n(),h(79,"input",16),n(),a(80,"mat-form-field",3)(81,"mat-label"),s(82),o(83,"translate"),n(),a(84,"mat-select",17),ke(85,an,3,5,"mat-option",8,Be),n()()(),a(87,"div",18)(88,"button",19),h(89,"fa-icon",20),s(90),o(91,"translate"),n(),a(92,"button",21),s(93),o(94,"translate"),h(95,"fa-icon",22),n()()()}if(m&2){let u=F(46);d("formGroup",r.sharesAccountTermsForm),t(4),l(c(5,29,"labels.inputs.Currency")),t(5),l(c(10,31,"labels.inputs.Current Price")),t(5),l(c(15,33,"labels.inputs.Total Number of Shares")),t(4),w(" ",c(19,35,"labels.inputs.Total Number of Shares")," ",c(20,37,"labels.commons.is")," "),t(4),l(c(23,39,"labels.commons.required")),t(2),_(r.currency?24:-1),t(3),l(c(28,41,"labels.inputs.Default Savings Account")),t(3),Ne(r.savingsAccountsData),t(3),w(" ",c(34,43,"labels.inputs.Default Savings Account")," ",c(35,45,"labels.commons.is")," "),t(4),l(c(38,47,"labels.commons.required")),t(4),l(c(42,49,"labels.inputs.Application Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(4),w(" ",c(49,51,"labels.inputs.Application Date")," ",c(50,53,"labels.commons.is")," "),t(4),l(c(53,55,"labels.commons.required")),t(3),S(" ",c(56,57,"labels.inputs.Allow dividends for inactive clients")," "),t(3),l(c(59,59,"labels.heading.Minimum Active Period")),t(4),l(c(63,61,"labels.inputs.Frequency")),t(5),l(c(68,63,"labels.inputs.Type")),t(3),Ne(r.minimumActivePeriodFrequencyTypeData),t(3),l(c(74,65,"labels.heading.Lock-in Period")),t(4),l(c(78,67,"labels.inputs.Frequency")),t(5),l(c(83,69,"labels.inputs.Type")),t(3),Ne(r.lockinPeriodFrequencyTypeData),t(5),S(" ",c(91,71,"labels.buttons.Previous")," "),t(3),S(" ",c(94,73,"labels.buttons.Next")," ")}},dependencies:[T,D,J,re,di,oe,Y,me,se,ce,Z,X,ue,he,fe,tt,et,Ce,ve,Se,N,vi,Le,be,nt,Xe,P,Ve],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();function nn(e,p){if(e&1&&(a(0,"mat-option",3),s(1),n()),e&2){let i=p.$implicit;d("value",i),t(),S(" ",i.name," ")}}function rn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function on(e,p){if(e&1&&(a(0,"td",23),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.name+", "+i.currency.displaySymbol," ")}}function sn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Type")))}function cn(e,p){if(e&1&&(a(0,"td",23),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeCalculationType.value,"catalogs")," ")}}function mn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function pn(e,p){if(e&1){let i=R();a(0,"td",23),s(1),a(2,"button",24),b("click",function(){let r=I(i).$implicit,u=A();return M(u.editCharge(r))}),h(3,"fa-icon",25),n()()}if(e&2){let i=p.$implicit;t(),S(" ",i.amount||i.amountOrPercentage," ")}}function ln(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Collected On")))}function dn(e,p){if(e&1&&(a(0,"td",23),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeTimeType.value,"catalogs")," ")}}function un(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Actions")))}function hn(e,p){if(e&1){let i=R();a(0,"td",23)(1,"button",26),b("click",function(){let r=I(i).$implicit,u=A();return M(u.deleteCharge(r))}),h(2,"fa-icon",27),n()()}}function fn(e,p){e&1&&h(0,"tr",28)}function Sn(e,p){e&1&&h(0,"tr",29)}var Qe=(()=>{class e{constructor(){this.dialog=f(He),this.translateService=f(pi),this.chargeData=[],this.chargesDataSource=[],this.pristine=!0,this.isChargesPatched=!1,this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","action"]}ngOnInit(){this.currencyCode.valueChanges.subscribe(()=>{!this.isChargesPatched&&this.sharesAccountTemplate.charges?(this.chargesDataSource=this.sharesAccountTemplate.charges,this.isChargesPatched=!0):this.chargesDataSource=[]})}ngOnChanges(){this.sharesAccountProductTemplate&&(this.chargeData=this.sharesAccountTemplate.chargeOptions,this.chargesDataSource=this.sharesAccountProductTemplate.charges)}addCharge(i){this.chargesDataSource=this.chargesDataSource.concat([i.value]),i.value="",this.pristine=!1}editCharge(i){let m=[new Fi({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:i.amount||i.amountOrPercentage,type:"number",required:!1})],r={title:this.translateService.instant("labels.heading.Edit Charge"),layout:{addButtonText:"Submit"},formfields:m};this.dialog.open(_i,{data:r}).afterClosed().subscribe(g=>{if(g.data){let q=K(H({},i),{amount:g.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(i),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(i){this.dialog.open(bt,{data:{deleteContext:`charge ${i.name}`}}).afterClosed().subscribe(r=>{r.delete&&(this.chargesDataSource.splice(this.chargesDataSource.indexOf(i),1),this.chargesDataSource=this.chargesDataSource.concat([]))}),this.pristine=!1}get sharesAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-charges-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate",currencyCode:"currencyCode"},features:[pt],decls:42,vars:21,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),s(3),o(4,"translate"),n(),a(5,"mat-select",null,0),ke(7,nn,2,2,"mat-option",3,Be),o(9,"chargesFilter"),n()(),a(10,"div",4)(11,"button",5),b("click",function(){I(u);let q=F(6);return M(r.addCharge(q))}),h(12,"fa-icon",6),s(13),o(14,"translate"),n()(),a(15,"table",7),y(16,8),C(17,rn,3,3,"th",9)(18,on,2,1,"td",10),E(),y(19,11),C(20,sn,3,3,"th",9)(21,cn,3,4,"td",10),E(),y(22,12),C(23,mn,3,3,"th",9)(24,pn,4,1,"td",10),E(),y(25,13),C(26,ln,3,3,"th",9)(27,dn,3,4,"td",10),E(),y(28,14),C(29,un,3,3,"th",9)(30,hn,3,0,"td",10),E(),C(31,fn,1,0,"tr",15)(32,Sn,1,0,"tr",16),n()(),a(33,"div",17)(34,"button",18),h(35,"fa-icon",19),s(36),o(37,"translate"),n(),a(38,"button",20),s(39),o(40,"translate"),h(41,"fa-icon",21),n()()}if(m&2){let u=F(6);t(3),l(c(4,9,"labels.inputs.Charge")),t(4),Ne(oi(9,11,r.chargeData,r.chargesDataSource,r.currencyCode.value)),t(4),d("disabled",!u.value),t(2),S(" ",c(14,15,"labels.buttons.Add")," "),t(2),d("dataSource",r.chargesDataSource)("hidden",r.chargesDataSource.length===0),t(16),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(4),S(" ",c(37,17,"labels.buttons.Previous")," "),t(3),S(" ",c(40,19,"labels.buttons.Next")," ")}},dependencies:[T,D,Z,X,tt,et,N,be,xe,ye,De,Ee,Te,Ie,ht,Me,we,Pe,Re,Le,nt,P,Ve,Ii],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();var Cn=e=>[e],vn=()=>["../"];function _n(e,p){if(e&1&&(a(0,"span",4),h(1,"mifosx-external-identifier",11),n()),e&2){let i=A();t(),d("externalId",L(i.sharesAccount.externalId))}}function An(e,p){e&1&&(a(0,"span",4),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}function gn(e,p){if(e&1&&(a(0,"div",2)(1,"span",3),s(2),o(3,"translate"),n(),a(4,"span",4),s(5),o(6,"find"),o(7,"translateKey"),n()()),e&2){let i=A();t(2),l(c(3,3,"labels.inputs.Minimum Active Period")),t(3),w("",i.sharesAccount.minimumActivePeriod,"\xA0",ae(7,10,_e(6,5,i.sharesAccount.minimumActivePeriodFrequencyType,i.sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function bn(e,p){if(e&1&&(a(0,"div",2)(1,"span",3),s(2),o(3,"translate"),n(),a(4,"span",4),s(5),o(6,"find"),o(7,"translateKey"),n()()),e&2){let i=A();t(2),l(c(3,3,"labels.inputs.Lock-in Period")),t(3),w("",i.sharesAccount.lockinPeriodFrequency,"\xA0",ae(7,10,_e(6,5,i.sharesAccount.lockinPeriodFrequencyType,i.sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function xn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function Tn(e,p){if(e&1&&(a(0,"td",22),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.name+", "+i.currency.displaySymbol," ")}}function Dn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Type")))}function yn(e,p){if(e&1&&(a(0,"td",22),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeCalculationType.value,"catalogs")," ")}}function En(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function In(e,p){if(e&1&&(a(0,"td",22),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.amount||i.amountOrPercentage," ")}}function Mn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Collected On")))}function Pn(e,p){if(e&1&&(a(0,"td",22),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeTimeType.value,"catalogs")," ")}}function wn(e,p){e&1&&h(0,"tr",23)}function Rn(e,p){e&1&&h(0,"tr",24)}function Fn(e,p){if(e&1&&(a(0,"div",5)(1,"h3",1),s(2),o(3,"translate"),n(),h(4,"mat-divider",2),a(5,"table",12),y(6,13),C(7,xn,3,3,"th",14)(8,Tn,2,1,"td",15),E(),y(9,16),C(10,Dn,3,3,"th",14)(11,yn,3,4,"td",15),E(),y(12,17),C(13,En,3,3,"th",14)(14,In,2,1,"td",15),E(),y(15,18),C(16,Mn,3,3,"th",14)(17,Pn,3,4,"td",15),E(),C(18,wn,1,0,"tr",19)(19,Rn,1,0,"tr",20),n()()),e&2){let i=A();t(2),l(c(3,4,"labels.heading.Charges")),t(3),d("dataSource",i.sharesAccount.charges),t(13),d("matHeaderRowDef",i.chargesDisplayedColumns),t(),d("matRowDefColumns",i.chargesDisplayedColumns)}}var st=(()=>{class e{constructor(){this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType"],this.submitEvent=new lt}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-preview-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate",sharesAccountTermsForm:"sharesAccountTermsForm",sharesAccount:"sharesAccount"},outputs:{submitEvent:"submitEvent"},decls:92,vars:90,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-fill"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[1,"layout-row-wrap","responsive-column","flex-fill"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"h3",1),s(2),o(3,"translate"),n(),h(4,"mat-divider",2),a(5,"div",2)(6,"span",3),s(7),o(8,"translate"),n(),a(9,"span",4),s(10),o(11,"find"),n()(),a(12,"div",2)(13,"span",3),s(14),o(15,"translate"),n(),a(16,"span",4),s(17),o(18,"dateFormat"),n()(),a(19,"div",2)(20,"span",3),s(21),o(22,"translate"),n(),v(23,_n,2,2,"span",4),v(24,An,3,3,"span",4),n(),a(25,"h3",1),s(26),o(27,"translate"),n(),h(28,"mat-divider",2),a(29,"div",2)(30,"span",3),s(31),o(32,"translate"),n(),a(33,"span",4),s(34),o(35,"find"),n()(),a(36,"div",2)(37,"span",3),s(38),o(39,"translate"),n(),a(40,"span",4),s(41),o(42,"formatNumber"),n()(),a(43,"div",2)(44,"span",3),s(45),o(46,"translate"),n(),a(47,"span",4),s(48),o(49,"formatNumber"),n()(),a(50,"div",2)(51,"span",3),s(52),o(53,"translate"),n(),a(54,"span",4),s(55),o(56,"formatNumber"),n()(),a(57,"div",2)(58,"span",3),s(59),o(60,"translate"),n(),a(61,"span",4),s(62),o(63,"find"),n()(),v(64,gn,8,13,"div",2),v(65,bn,8,13,"div",2),a(66,"div",2)(67,"span",3),s(68),o(69,"translate"),n(),a(70,"span",4),s(71),o(72,"dateFormat"),n()(),a(73,"div",2)(74,"span",3),s(75),o(76,"translate"),n(),a(77,"span",4),s(78),o(79,"yesNo"),n()(),v(80,Fn,20,6,"div",5),n(),a(81,"div",6)(82,"button",7),h(83,"fa-icon",8),s(84),o(85,"translate"),n(),a(86,"button",9),s(87),o(88,"translate"),n(),a(89,"button",10),b("click",function(){return r.submitEvent.emit()}),s(90),o(91,"translate"),n()()),m&2&&(t(2),l(c(3,30,"labels.heading.Details")),t(5),l(c(8,32,"labels.inputs.Product")),t(3),l(_e(11,34,r.sharesAccount.productId,r.sharesAccountTemplate.productOptions,"id","name")),t(4),l(c(15,39,"labels.inputs.Submitted On")),t(3),l(c(18,41,r.sharesAccount.submittedDate)),t(4),l(c(22,43,"labels.inputs.External Id")),t(2),_(r.sharesAccount.externalId?23:-1),t(),_(r.sharesAccount.externalId?-1:24),t(2),l(c(27,45,"labels.heading.Terms")),t(5),l(c(32,47,"labels.inputs.Currency")),t(3),l(_e(35,49,r.sharesAccountTermsForm.get("currencyCode").value,ri(87,Cn,r.sharesAccountProductTemplate.currency),"code","displayLabel")),t(4),l(c(39,54,"labels.inputs.Total Number of Shares")),t(3),l(c(42,56,r.sharesAccount.requestedShares)),t(4),l(c(46,58,"labels.inputs.Current Price")),t(3),l(c(49,60,r.sharesAccountTermsForm.get("unitPrice").value)),t(4),l(c(53,62,"labels.inputs.Amount")),t(3),l(c(56,64,r.sharesAccount.requestedShares*r.sharesAccountTermsForm.get("unitPrice").value)),t(4),l(c(60,66,"labels.inputs.Default Savings Account")),t(3),l(_e(63,68,r.sharesAccount.savingsAccountId,r.sharesAccountProductTemplate.clientSavingsAccounts,"id","accountNo")),t(2),_(r.sharesAccount.minimumActivePeriod?64:-1),t(),_(r.sharesAccount.lockinPeriodFrequency?65:-1),t(3),l(c(69,73,"labels.inputs.Application Date")),t(3),l(c(72,75,r.sharesAccount.applicationDate)),t(4),l(c(76,77,"labels.inputs.Allow dividends for inactive clients")),t(3),l(c(79,79,r.sharesAccount.allowDividendCalculationForInactiveClients)),t(2),_(r.sharesAccount.charges.length?80:-1),t(4),S(" ",c(85,81,"labels.buttons.Previous")," "),t(2),d("routerLink",O(89,vn)),t(),S(" ",c(88,83,"labels.buttons.Cancel")," "),t(3),S(" ",c(91,85,"labels.buttons.Submit")," "))},dependencies:[T,D,W,N,Ti,It,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Le,be,Fe,P,Ve,Mi,rt,Pi],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();function Bn(e,p){e&1&&h(0,"fa-icon",14)}function kn(e,p){e&1&&h(0,"fa-icon",14)}function Nn(e,p){e&1&&h(0,"fa-icon",15)}function On(e,p){e&1&&h(0,"fa-icon",16)}function Vn(e,p){e&1&&h(0,"fa-icon",17)}function qn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.DETAILS"))}function Hn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.TERMS"))}function jn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.CHARGES"))}function Ln(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.PREVIEW"))}function Un(e,p){if(e&1){let i=R();a(0,"mat-step",13),C(1,Ln,2,3,"ng-template",9),a(2,"mifosx-shares-account-preview-step",18),b("submitEvent",function(){I(i);let r=A();return M(r.submit())}),n()()}if(e&2){let i=A();t(2),d("sharesAccountProductTemplate",i.sharesAccountProductTemplate)("sharesAccountTemplate",i.sharesAccountTemplate)("sharesAccountTermsForm",i.sharesAccountTermsForm)("sharesAccount",i.sharesAccount)}}var Nt=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.dateUtils=f(ne),this.sharesService=f(k),this.settingsService=f(j),this.route.data.subscribe(i=>{this.sharesAccountTemplate=i.sharesAccountTemplate})}setTemplate(i){this.sharesAccountProductTemplate=i}get sharesAccountDetailsForm(){return this.sharesAccountDetailsStep.sharesAccountDetailsForm}get sharesAccountTermsForm(){return this.sharesAccountTermsStep.sharesAccountTermsForm}get sharesAccountFormValid(){return this.sharesAccountDetailsForm.valid&&this.sharesAccountTermsForm.valid}get sharesAccount(){return H(H(H({},this.sharesAccountDetailsStep.sharesAccountDetails),this.sharesAccountTermsStep.sharesAccountTerms),this.sharesAccountChargesStep.sharesAccountCharges)}submit(){let i=this.settingsService.language.code,m=this.settingsService.dateFormat,r=K(H({},this.sharesAccount),{clientId:this.sharesAccountTemplate.clientId,charges:this.sharesAccount.charges.map(u=>({chargeId:u.id,amount:u.amount})),applicationDate:this.dateUtils.formatDate(this.sharesAccount.applicationDate,m),submittedDate:this.dateUtils.formatDate(this.sharesAccount.submittedDate,m),unitPrice:this.sharesAccountTermsForm.get("unitPrice").value,dateFormat:m,locale:i});this.sharesService.createSharesAccount(r).subscribe(u=>{this.router.navigate(["../",u.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-create-shares-account"]],viewQuery:function(m,r){if(m&1&&(ee(Ge,7),ee(ze,7),ee(Qe,7)),m&2){let u;te(u=ie())&&(r.sharesAccountDetailsStep=u.first),te(u=ie())&&(r.sharesAccountTermsStep=u.first),te(u=ie())&&(r.sharesAccountChargesStep=u.first)}},decls:18,vars:9,consts:[["shareProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"sharesAccountProductTemplate","sharesAccountTemplate"],[3,"sharesAccountProductTemplate"],[3,"sharesAccountProductTemplate","sharesAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","sharesAccountProductTemplate","sharesAccountTemplate","sharesAccountTermsForm","sharesAccount"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-stepper",2,0),C(3,Bn,1,0,"ng-template",3)(4,kn,1,0,"ng-template",4)(5,Nn,1,0,"ng-template",5)(6,On,1,0,"ng-template",6)(7,Vn,1,0,"ng-template",7),a(8,"mat-step",8),C(9,qn,2,3,"ng-template",9),a(10,"mifosx-shares-account-details-step",10),b("sharesAccountProductTemplate",function(q){return I(u),M(r.setTemplate(q))}),n()(),a(11,"mat-step",8),C(12,Hn,2,3,"ng-template",9),h(13,"mifosx-shares-account-terms-step",11),n(),a(14,"mat-step"),C(15,jn,2,3,"ng-template",9),h(16,"mifosx-shares-account-charges-step",12),n(),v(17,Un,3,4,"mat-step",13),n()()}m&2&&(t(),d("linear",!1),t(7),d("stepControl",r.sharesAccountDetailsForm),t(2),d("sharesAccountTemplate",r.sharesAccountTemplate),t(),d("stepControl",r.sharesAccountTermsForm),t(2),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate),t(3),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountTemplate)("currencyCode",r.sharesAccountTermsForm.get("currencyCode")),t(),_(r.sharesAccountFormValid?17:-1))},dependencies:[T,D,Et,Dt,be,yt,Tt,Ge,ze,Qe,st,P],encapsulation:2})}}return e})();function $n(e,p){e&1&&h(0,"fa-icon",13)}function Gn(e,p){e&1&&h(0,"fa-icon",13)}function zn(e,p){e&1&&h(0,"fa-icon",14)}function Qn(e,p){e&1&&h(0,"fa-icon",15)}function Kn(e,p){e&1&&h(0,"fa-icon",16)}function Wn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.DETAILS"))}function Yn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.TERMS"))}function Jn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.CHARGES"))}function Xn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.PREVIEW"))}function Zn(e,p){if(e&1){let i=R();a(0,"mat-step",12),C(1,Xn,2,3,"ng-template",9),a(2,"mifosx-shares-account-preview-step",17),b("submitEvent",function(){I(i);let r=A();return M(r.submit())}),n()()}if(e&2){let i=A();t(2),d("sharesAccountProductTemplate",i.sharesAccountProductTemplate)("sharesAccountTemplate",i.sharesAccountAndTemplate)("sharesAccountTermsForm",i.sharesAccountTermsForm)("sharesAccount",i.sharesAccount)}}var Ot=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.dateUtils=f(ne),this.sharesService=f(k),this.settingsService=f(j),this.route.data.subscribe(i=>{this.sharesAccountAndTemplate=i.sharesAccountAndTemplate})}setTemplate(i){this.sharesAccountProductTemplate=i}get sharesAccountDetailsForm(){return this.sharesAccountDetailsStep.sharesAccountDetailsForm}get sharesAccountTermsForm(){return this.sharesAccountTermsStep.sharesAccountTermsForm}get sharesAccountFormValidAndNotPristine(){return this.sharesAccountDetailsForm.valid&&this.sharesAccountTermsForm.valid&&(!this.sharesAccountDetailsForm.pristine||!this.sharesAccountTermsForm.pristine||!this.sharesAccountChargesStep.pristine)}get sharesAccount(){return H(H(H({},this.sharesAccountDetailsStep.sharesAccountDetails),this.sharesAccountTermsStep.sharesAccountTerms),this.sharesAccountChargesStep.sharesAccountCharges)}submit(){let i=this.settingsService.language.code,m=this.settingsService.dateFormat,r=K(H({},this.sharesAccount),{clientId:this.sharesAccountAndTemplate.clientId,charges:this.sharesAccount.charges.map(u=>({chargeId:u.id,amount:u.amount})),applicationDate:this.dateUtils.formatDate(this.sharesAccount.applicationDate,m),submittedDate:this.dateUtils.formatDate(this.sharesAccount.submittedDate,m),unitPrice:this.sharesAccountTermsForm.get("unitPrice").value,dateFormat:m,locale:i});this.sharesService.updateSharesAccount(this.sharesAccountAndTemplate.id,r).subscribe(u=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-edit-shares-account"]],viewQuery:function(m,r){if(m&1&&(ee(Ge,7),ee(ze,7),ee(Qe,7)),m&2){let u;te(u=ie())&&(r.sharesAccountDetailsStep=u.first),te(u=ie())&&(r.sharesAccountTermsStep=u.first),te(u=ie())&&(r.sharesAccountChargesStep=u.first)}},decls:18,vars:10,consts:[["shareProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"sharesAccountProductTemplate","sharesAccountTemplate"],[3,"sharesAccountProductTemplate","sharesAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","sharesAccountProductTemplate","sharesAccountTemplate","sharesAccountTermsForm","sharesAccount"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-stepper",2,0),C(3,$n,1,0,"ng-template",3)(4,Gn,1,0,"ng-template",4)(5,zn,1,0,"ng-template",5)(6,Qn,1,0,"ng-template",6)(7,Kn,1,0,"ng-template",7),a(8,"mat-step",8),C(9,Wn,2,3,"ng-template",9),a(10,"mifosx-shares-account-details-step",10),b("sharesAccountProductTemplate",function(q){return I(u),M(r.setTemplate(q))}),n()(),a(11,"mat-step",8),C(12,Yn,2,3,"ng-template",9),h(13,"mifosx-shares-account-terms-step",10),n(),a(14,"mat-step"),C(15,Jn,2,3,"ng-template",9),h(16,"mifosx-shares-account-charges-step",11),n(),v(17,Zn,3,4,"mat-step",12),n()()}m&2&&(t(),d("linear",!1),t(7),d("stepControl",r.sharesAccountDetailsForm),t(2),d("sharesAccountTemplate",r.sharesAccountAndTemplate),t(),d("stepControl",r.sharesAccountTermsForm),t(2),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountAndTemplate),t(3),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountAndTemplate)("currencyCode",r.sharesAccountTermsForm.get("currencyCode")),t(),_(r.sharesAccountFormValidAndNotPristine?17:-1))},dependencies:[T,D,Et,Dt,be,yt,Tt,Ge,ze,Qe,st,P],encapsulation:2})}}return e})();var er=()=>["../../"];function tr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Vt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveSharesAccountForm()}createApproveSharesAccountForm(){this.approveSharesAccountForm=this.formBuilder.group({approvedDate:["",G.required],note:[""]})}submit(){let i=this.approveSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.approveSharesAccountForm.value.approvedDate;i.approvedDate instanceof Date&&(i.approvedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"approve",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-shares-account"]],decls:26,vars:21,consts:[["approvedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,tr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.approveSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Approved On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.approveSharesAccountForm.controls.approvedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,er)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.approveSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var ir=()=>["../../"];function ar(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var qt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectSharesAccountForm()}createRejectSharesAccountForm(){this.rejectSharesAccountForm=this.formBuilder.group({rejectedDate:["",G.required],note:[""]})}submit(){let i=this.rejectSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.rejectSharesAccountForm.value.rejectedDate;i.rejectedDate instanceof Date&&(i.rejectedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"reject",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-shares-account"]],decls:26,vars:21,consts:[["rejectedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,ar,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.rejectSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Rejected On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.rejectSharesAccountForm.controls.rejectedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,ir)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.rejectSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nr=()=>["../../"];function rr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Ht=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseSharesAccountForm()}createCloseSharesAccountForm(){this.closeSharesAccountForm=this.formBuilder.group({closedDate:["",G.required],note:[""]})}submit(){let i=this.closeSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.closeSharesAccountForm.value.closedDate;i.closedDate instanceof Date&&(i.closedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"close",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-close-shares-account"]],decls:26,vars:21,consts:[["closedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,rr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.closeSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Closed On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.closeSharesAccountForm.controls.closedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,nr)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.closeSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var or=()=>["../../"];function sr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var jt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateSharesAccountForm()}createActivateSharesAccountForm(){this.activateSharesAccountForm=this.formBuilder.group({activatedDate:["",G.required]})}submit(){let i=this.activateSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.activateSharesAccountForm.value.activatedDate;i.activatedDate instanceof Date&&(i.activatedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"activate",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-activate-shares-account"]],decls:20,vars:18,consts:[["activatedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activatedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"mat-form-field",3),b("click",function(){I(u);let q=F(11);return M(q.open())}),a(5,"mat-label"),s(6),o(7,"translate"),n(),h(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),v(12,sr,7,9,"mat-error"),n()(),a(13,"mat-card-actions",6)(14,"button",7),s(15),o(16,"translate"),n(),a(17,"button",8),s(18),o(19,"translate"),n()()()()()}if(m&2){let u=F(11);t(2),d("formGroup",r.activateSharesAccountForm),t(4),l(c(7,11,"labels.inputs.Activated On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.activateSharesAccountForm.controls.activatedDate.hasError("required")?12:-1),t(2),d("routerLink",O(17,or)),t(),S(" ",c(16,13,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.activateSharesAccountForm.valid),t(),S(" ",c(19,15,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var cr=()=>["../../"],Lt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.router=f(Q),this.accountId=this.route.parent.snapshot.params.shareAccountId}submit(){this.sharesService.executeSharesAccountCommand(this.accountId,"undoapproval",{}).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-undo-approval-shares-account"]],decls:15,vars:12,consts:[[1,"container"],[3,"ngSubmit"],[1,"mat-typography","confirm-text"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn"]],template:function(m,r){m&1&&(a(0,"div",0)(1,"mat-card")(2,"form",1),b("ngSubmit",function(){return r.submit()}),a(3,"mat-card-content")(4,"div")(5,"p",2),s(6),o(7,"translate"),n()()(),a(8,"mat-card-actions",3)(9,"button",4),s(10),o(11,"translate"),n(),a(12,"button",5),s(13),o(14,"translate"),n()()()()()),m&2&&(t(6),w(" ",c(7,5,"labels.text.Undo approval of shares account with ID"),": ",r.accountId," ? "),t(3),d("routerLink",O(11,cr)),t(),S(" ",c(11,7,"labels.buttons.Cancel")," "),t(3),l(c(14,9,"labels.buttons.Submit")))},dependencies:[T,D,J,Y,W,le,de,ge,N,ui,li,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .confirm-text[_ngcontent-%COMP%]{font-size:16px;text-align:center}"]})}}return e})();var mr=()=>["../../"];function pr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Request Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}function lr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Requested Shares")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Ut=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApplySharesAccountForm(),this.applySharesForm.get("unitPrice").patchValue(this.sharesAccountData.currentMarketPrice||"")}createApplySharesAccountForm(){this.applySharesForm=this.formBuilder.group({requestedDate:["",G.required],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}]})}submit(){let i=this.applySharesForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.applySharesForm.value.requestedDate;i.requestedDate instanceof Date&&(i.requestedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{unitPrice:this.applySharesForm.get("unitPrice").value,dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"applyadditionalshares",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-apply-shares"]],decls:32,vars:25,consts:[["requestedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","requestedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","requestedShares"],["matInput","","required","","formControlName","unitPrice"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,pr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"input",7),v(19,lr,7,9,"mat-error"),n(),a(20,"mat-form-field")(21,"mat-label"),s(22),o(23,"translate"),n(),h(24,"input",8),n()()(),a(25,"mat-card-actions",9)(26,"button",10),s(27),o(28,"translate"),n(),a(29,"button",11),s(30),o(31,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.applySharesForm),t(5),l(c(8,14,"labels.inputs.Request Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.applySharesForm.controls.requestedDate.hasError("required")?13:-1),t(3),l(c(17,16,"labels.inputs.Total No. of Shares")),t(3),_(r.applySharesForm.controls.requestedShares.hasError("required")?19:-1),t(3),l(c(23,18,"labels.inputs.Current Price")),t(4),d("routerLink",O(24,mr)),t(),S(" ",c(28,20,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.applySharesForm.valid),t(),S(" ",c(31,22,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var dr=()=>["../../"];function ur(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Request Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}function hr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Requested Shares")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var $t=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRedeemSharesAccountForm(),this.redeemSharesForm.get("unitPrice").patchValue(this.sharesAccountData.currentMarketPrice||"")}createRedeemSharesAccountForm(){this.redeemSharesForm=this.formBuilder.group({requestedDate:["",G.required],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}]})}submit(){let i=this.redeemSharesForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.redeemSharesForm.value.requestedDate;i.requestedDate instanceof Date&&(i.requestedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{unitPrice:this.redeemSharesForm.get("unitPrice").value,dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"redeemshares",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-redeem-shares"]],decls:32,vars:25,consts:[["requestedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","requestedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","requestedShares"],["matInput","","required","","formControlName","unitPrice"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,ur,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"input",7),v(19,hr,7,9,"mat-error"),n(),a(20,"mat-form-field")(21,"mat-label"),s(22),o(23,"translate"),n(),h(24,"input",8),n()()(),a(25,"mat-card-actions",9)(26,"button",10),s(27),o(28,"translate"),n(),a(29,"button",11),s(30),o(31,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.redeemSharesForm),t(5),l(c(8,14,"labels.inputs.Request Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.redeemSharesForm.controls.requestedDate.hasError("required")?13:-1),t(3),l(c(17,16,"labels.inputs.Total No. of Shares")),t(3),_(r.redeemSharesForm.controls.requestedShares.hasError("required")?19:-1),t(3),l(c(23,18,"labels.inputs.Current Price")),t(4),d("routerLink",O(24,dr)),t(),S(" ",c(28,20,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.redeemSharesForm.valid),t(),S(" ",c(31,22,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var fr=()=>({approve:!0}),Gt=(()=>{class e{constructor(){this.dialogRef=f(ft),this.data=f(St)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-share-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(m,r){m&1&&(a(0,"h1",0),s(1),o(2,"translate"),n(),a(3,"div",1)(4,"p"),s(5),o(6,"translate"),n()(),a(7,"mat-dialog-actions",2)(8,"button",3),s(9),o(10,"translate"),n(),a(11,"button",4),s(12),o(13,"translate"),n()()),m&2&&(t(),l(c(2,6,"labels.heading.Approve Share")),t(4),w("",c(6,8,"labels.text.Are you sure you want to approve share with id"),": ",r.data.shareId," ?"),t(4),l(c(10,10,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",O(14,fr)),t(),S(" ",c(13,12,"labels.buttons.Submit")," "))},dependencies:[T,D,N,vt,_t,At,Ct,P],encapsulation:2})}}return e})();var Sr=["sharesTable"],Cr=()=>[10,25,50,100];function vr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function _r(e,p){if(e&1&&(a(0,"td",16),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function Ar(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function gr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function br(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Purchased/Redeemed Price")," "))}function xr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.purchasedPrice)}}function Tr(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Dr(e,p){if(e&1&&(a(0,"td",16),h(1,"i",18),o(2,"statusLookup"),n()),e&2){let i=p.$implicit;t(),d("ngClass",c(2,2,i.status.code))("matTooltip",i.status.value)}}function yr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Confirm Approve")))}function Er(e,p){if(e&1){let i=R();a(0,"td",16)(1,"button",19),o(2,"translate"),b("click",function(){let r=I(i).$implicit,u=A();return M(u.approve(r.id))}),h(3,"i",20),n()()}e&2&&(t(),d("matTooltip",L(c(2,2,"tooltips.Approve Share"))))}function Ir(e,p){e&1&&h(0,"tr",21)}function Mr(e,p){e&1&&h(0,"tr",22)}var zt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.dialog=f(He),this.settingsService=f(j),this.displayedColumns=["transactionDate","totalShares","redeemedPrice","status","approve"],this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.sharesData=this.sharesAccountData.purchasedShares.filter(i=>i.status.value==="Pending Approval"),this.setShares()}setShares(){this.dataSource=new qe(this.sharesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}approve(i){this.dialog.open(Gt,{data:{shareId:i}}).afterClosed().subscribe(r=>{if(r.approve){let u=this.settingsService.language.code,g=this.settingsService.dateFormat,q={requestedShares:[{id:i}],dateFormat:g,locale:u};this.sharesService.executeSharesAccountCommand(this.accountId,"approveadditionalshares",q).subscribe(()=>{let Xt=this.sharesData.find(ei=>ei.id===i),Zt=this.sharesData.indexOf(Xt);this.sharesData.splice(Zt,1),this.dataSource.data=this.sharesData,this.sharesTableRef.renderRows()})}})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-shares"]],viewQuery:function(m,r){if(m&1&&(ee(it,7),ee(at,7),ee(Sr,7)),m&2){let u;te(u=ie())&&(r.paginator=u.first),te(u=ie())&&(r.sort=u.first),te(u=ie())&&(r.sharesTableRef=u.first)}},decls:22,vars:5,consts:[["sharesTable",""],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalShares"],["matColumnDef","redeemedPrice"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","approve"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","accent",1,"share-action-button",3,"click","matTooltip"],[1,"fa","fa-check"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",1)(1,"div",2)(2,"table",3,0),y(4,4),C(5,vr,3,3,"th",5)(6,_r,3,3,"td",6),E(),y(7,7),C(8,Ar,3,3,"th",5)(9,gr,2,1,"td",6),E(),y(10,8),C(11,br,3,3,"th",5)(12,xr,2,1,"td",6),E(),y(13,9),C(14,Tr,3,3,"th",10)(15,Dr,3,4,"td",6),E(),y(16,11),C(17,yr,3,3,"th",5)(18,Er,4,4,"td",6),E(),C(19,Ir,1,0,"tr",12)(20,Mr,1,0,"tr",13),n(),h(21,"mat-paginator",14),n()()),m&2&&(t(2),d("dataSource",r.dataSource),t(17),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(),d("pageSizeOptions",O(4,Cr)))},dependencies:[T,Je,D,N,xe,at,ye,De,Ee,xt,Te,Ie,je,Me,we,Pe,Re,it,Fe,P,ot],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}table[_ngcontent-%COMP%] .share-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();var Pr=()=>({reject:!0}),Qt=(()=>{class e{constructor(){this.dialogRef=f(ft),this.data=f(St)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-share-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(m,r){m&1&&(a(0,"h1",0),s(1),o(2,"translate"),n(),a(3,"div",1)(4,"p"),s(5),o(6,"translate"),n()(),a(7,"mat-dialog-actions",2)(8,"button",3),s(9),o(10,"translate"),n(),a(11,"button",4),s(12),o(13,"translate"),n()()),m&2&&(t(),l(c(2,6,"labels.heading.Reject Share")),t(4),w("",c(6,8,"labels.text.Are you sure you want to reject share with id"),": ",r.data.shareId," ?"),t(4),l(c(10,10,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",O(14,Pr)),t(),S(" ",c(13,12,"labels.buttons.Submit")," "))},dependencies:[T,D,N,vt,_t,At,Ct,P],encapsulation:2})}}return e})();var wr=["sharesTable"],Rr=()=>[10,25,50,100];function Fr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function Br(e,p){if(e&1&&(a(0,"td",16),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function kr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function Nr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function Or(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Purchased/Redeemed Price")," "))}function Vr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.purchasedPrice)}}function qr(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Hr(e,p){if(e&1&&(a(0,"td",16),h(1,"i",18),o(2,"statusLookup"),n()),e&2){let i=p.$implicit;t(),d("ngClass",c(2,2,i.status.code))("matTooltip",i.status.value)}}function jr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S("",c(2,1,"labels.inputs.Confirm Reject"),"t"))}function Lr(e,p){if(e&1){let i=R();a(0,"td",16)(1,"button",19),o(2,"translate"),b("click",function(){let r=I(i).$implicit,u=A();return M(u.reject(r.id))}),h(3,"i",20),n()()}e&2&&(t(),d("matTooltip",L(c(2,2,"tooltips.Reject Share"))))}function Ur(e,p){e&1&&h(0,"tr",21)}function $r(e,p){e&1&&h(0,"tr",22)}var Kt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.dialog=f(He),this.settingsService=f(j),this.displayedColumns=["transactionDate","totalShares","redeemedPrice","status","reject"],this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.sharesData=this.sharesAccountData.purchasedShares.filter(i=>i.status.value==="Pending Approval"),this.setShares()}setShares(){this.dataSource=new qe(this.sharesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}reject(i){this.dialog.open(Qt,{data:{shareId:i}}).afterClosed().subscribe(r=>{if(r.reject){let u=this.settingsService.language.code,g=this.settingsService.dateFormat,q={requestedShares:[{id:i}],dateFormat:g,locale:u};this.sharesService.executeSharesAccountCommand(this.accountId,"rejectadditionalshares",q).subscribe(()=>{let Xt=this.sharesData.find(ei=>ei.id===i),Zt=this.sharesData.indexOf(Xt);this.sharesData.splice(Zt,1),this.dataSource.data=this.sharesData,this.sharesTableRef.renderRows()})}})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-shares"]],viewQuery:function(m,r){if(m&1&&(ee(it,7),ee(at,7),ee(wr,7)),m&2){let u;te(u=ie())&&(r.paginator=u.first),te(u=ie())&&(r.sort=u.first),te(u=ie())&&(r.sharesTableRef=u.first)}},decls:22,vars:5,consts:[["sharesTable",""],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalShares"],["matColumnDef","redeemedPrice"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","reject"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","warn",1,"share-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",1)(1,"div",2)(2,"table",3,0),y(4,4),C(5,Fr,3,3,"th",5)(6,Br,3,3,"td",6),E(),y(7,7),C(8,kr,3,3,"th",5)(9,Nr,2,1,"td",6),E(),y(10,8),C(11,Or,3,3,"th",5)(12,Vr,2,1,"td",6),E(),y(13,9),C(14,qr,3,3,"th",10)(15,Hr,3,4,"td",6),E(),y(16,11),C(17,jr,3,3,"th",5)(18,Lr,4,4,"td",6),E(),C(19,Ur,1,0,"tr",12)(20,$r,1,0,"tr",13),n(),h(21,"mat-paginator",14),n()()),m&2&&(t(2),d("dataSource",r.dataSource),t(17),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(),d("pageSizeOptions",O(4,Rr)))},dependencies:[T,Je,D,N,xe,at,ye,De,Ee,xt,Te,Ie,je,Me,we,Pe,Re,it,Fe,P,ot],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}table[_ngcontent-%COMP%] .share-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();function Gr(e,p){e&1&&h(0,"mifosx-approve-shares-account")}function zr(e,p){e&1&&h(0,"mifosx-reject-shares-account")}function Qr(e,p){e&1&&h(0,"mifosx-close-shares-account")}function Kr(e,p){e&1&&h(0,"mifosx-activate-shares-account")}function Wr(e,p){e&1&&h(0,"mifosx-undo-approval-shares-account")}function Yr(e,p){e&1&&h(0,"mifosx-apply-shares")}function Jr(e,p){e&1&&h(0,"mifosx-redeem-shares")}function Xr(e,p){e&1&&h(0,"mifosx-approve-shares")}function Zr(e,p){e&1&&h(0,"mifosx-reject-shares")}var Wt=(()=>{class e{constructor(){this.route=f(B),this.actions={Approve:!1,Reject:!1,Close:!1,Activate:!1,"Undo Approval":!1,"Apply Additional Shares":!1,"Redeem Shares":!1,"Approve Additional Shares":!1,"Reject Additional Shares":!1};let i=this.route.snapshot.params.name;i&&i in this.actions&&(this.actions[i]=!0)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-actions"]],decls:9,vars:9,template:function(m,r){m&1&&(v(0,Gr,1,0,"mifosx-approve-shares-account"),v(1,zr,1,0,"mifosx-reject-shares-account"),v(2,Qr,1,0,"mifosx-close-shares-account"),v(3,Kr,1,0,"mifosx-activate-shares-account"),v(4,Wr,1,0,"mifosx-undo-approval-shares-account"),v(5,Yr,1,0,"mifosx-apply-shares"),v(6,Jr,1,0,"mifosx-redeem-shares"),v(7,Xr,1,0,"mifosx-approve-shares"),v(8,Zr,1,0,"mifosx-reject-shares")),m&2&&(_(r.actions.Approve?0:-1),t(),_(r.actions.Reject?1:-1),t(),_(r.actions.Close?2:-1),t(),_(r.actions.Activate?3:-1),t(),_(r.actions["Undo Approval"]?4:-1),t(),_(r.actions["Apply Additional Shares"]?5:-1),t(),_(r.actions["Redeem Shares"]?6:-1),t(),_(r.actions["Approve Additional Shares"]?7:-1),t(),_(r.actions["Reject Additional Shares"]?8:-1))},dependencies:[T,D,Vt,qt,Ht,jt,Lt,Ut,$t,zt,Kt],encapsulation:2})}}return e})();var Yt=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("shareAccountId")||i.parent.paramMap.get("shareAccountId");return this.sharesService.getSharesAccountData(m,!1)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ii=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("name"),r=i.paramMap.get("shareAccountId")||i.parent.parent.paramMap.get("shareAccountId");switch(m){case"Apply Additional Shares":case"Redeem Shares":case"Approve Additional Shares":case"Reject Additional Shares":return this.sharesService.getSharesAccountData(r,!0);default:return}}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ai=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.parent.parent.paramMap.get("clientId");return this.sharesService.getSharesAccountTemplate(m)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ni=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("shareAccountId");return this.sharesService.getSharesAccountData(m,!0)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();function eo(e,p){if(e&1&&(a(0,"td"),s(1),o(2,"dateFormat"),n()),e&2){let i=A();t(),S(" ",c(2,1,i.sharesAccountData.timeline.activatedDate)," ")}}function to(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.text.Not Activated")," "))}function io(e,p){if(e&1&&(a(0,"td"),h(1,"mifosx-external-identifier",5),n()),e&2){let i=A();t(),d("externalId",L(i.sharesAccountData.externalId))}}function ao(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}function no(e,p){if(e&1&&(a(0,"td"),h(1,"mifosx-account-number",6),n()),e&2){let i=A();t(),d("clientId",L(i.sharesAccountData.clientId))("accountId",L(i.sharesAccountData.savingsAccountId))("accountNo",L(i.sharesAccountData.savingsAccountNumber))}}function ro(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}var Jt=(()=>{class e{constructor(){this.route=f(B),this.route.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-general-tab"]],decls:52,vars:38,consts:[[1,"tab-container","mat-typography"],[1,"shares-account-tables","layout-row","gap-2percent"],[1,"flex-49"],[1,"table-headers"],[1,"r-amount"],[3,"externalId"],["accountType","2",3,"clientId","accountId","accountNo"]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h4",3),s(4),o(5,"translate"),n(),a(6,"table")(7,"tbody")(8,"tr")(9,"td"),s(10),o(11,"translate"),n(),v(12,eo,3,3,"td"),v(13,to,3,3,"td"),n(),a(14,"tr")(15,"td"),s(16),o(17,"translate"),n(),a(18,"td"),s(19),n()(),a(20,"tr")(21,"td"),s(22),o(23,"translate"),n(),v(24,io,2,2,"td"),v(25,ao,3,3,"td"),n(),a(26,"tr")(27,"td"),s(28),o(29,"translate"),n(),v(30,no,2,6,"td"),v(31,ro,3,3,"td"),n()()()(),a(32,"div",2)(33,"h4",3),s(34),o(35,"translate"),n(),a(36,"table")(37,"tbody")(38,"tr")(39,"td"),s(40),o(41,"translate"),n(),a(42,"td",4),s(43),o(44,"formatNumber"),n()(),a(45,"tr")(46,"td"),s(47),o(48,"translate"),n(),a(49,"td",4),s(50),o(51,"formatNumber"),n()()()()()()()),m&2&&(t(4),l(c(5,18,"labels.heading.Shares Details")),t(6),l(c(11,20,"labels.inputs.Activated On")),t(2),_(r.sharesAccountData.timeline.activatedDate?12:-1),t(),_(r.sharesAccountData.timeline.activatedDate?-1:13),t(3),l(c(17,22,"labels.inputs.Currency")),t(3),w("",r.sharesAccountData.currency.name," [",r.sharesAccountData.currency.code,"]"),t(3),l(c(23,24,"labels.inputs.External Id")),t(2),_(r.sharesAccountData.externalId?24:-1),t(),_(r.sharesAccountData.externalId?-1:25),t(3),l(c(29,26,"labels.inputs.Linked Savings Account(Dividend Posting)")),t(2),_(r.sharesAccountData.savingsAccountNumber?30:-1),t(),_(r.sharesAccountData.savingsAccountNumber?-1:31),t(3),l(c(35,28,"labels.heading.Account Summary")),t(6),l(c(41,30,"labels.inputs.Pending for Approval Shares")),t(3),l(c(44,32,r.sharesAccountData.summary.totalPendingForApprovalShares)),t(4),l(c(48,34,"labels.inputs.Approved Shares")),t(3),l(c(51,36,r.sharesAccountData.summary.totalApprovedShares)))},dependencies:[T,D,It,Mt,Fe,P,rt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return e})();var oo=[{path:"",data:{title:"Shares",breadcrumb:"Shares",routeParamBreadcrumb:!1,addBreadcrumbLink:!1},children:[{path:"create",data:{title:"Create Shares Account",breadcrumb:"Create Shares Account"},component:Nt,resolve:{sharesAccountTemplate:ai}},{path:":shareAccountId",data:{title:"Shares Account View",routeParamBreadcrumb:"shareAccountId"},children:[{path:"",component:Rt,resolve:{sharesAccountData:Yt},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Jt,data:{title:"Shares Account General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{sharesAccountData:Yt}},{path:"transactions",component:Ft,data:{title:"Shares Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:Bt,data:{title:"Shares Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"dividends",component:kt,data:{title:"Shares Account Dividends",breadcrumb:"Dividends",routeParamBreadcrumb:!1}}]},{path:"edit",data:{title:"Edit Shares Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Ot,resolve:{sharesAccountAndTemplate:ni}},{path:"actions/:name",data:{title:"Shares Account Actions",breadcrumb:"Actions",routeParamBreadcrumb:"name"},component:Wt,resolve:{shareAccountActionData:ii}}]}]}],Vi=(()=>{class e{static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275mod=dt({type:e})}static{this.\u0275inj=mt({providers:[Yt,ai,ni,ii],imports:[ti.forChild(oo),ti]})}}return e})();var O0=(()=>{class e{static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275mod=dt({type:e})}static{this.\u0275inj=mt({imports:[ki,wi,Ri,Vi,Rt,Ft,kt,Bt,Nt,Ge,ze,Qe,st,Ot,Wt,Vt,qt,Ht,jt,Lt,Ut,$t,zt,Gt,Kt,Qt,Jt]})}}return e})();export{O0 as SharesModule};
|