/** Angular Imports */ import { Component } from '@angular/core' ; import { ActivatedRoute , Router } from '@angular/router' ; /** Custom Services */ import { SharesService } from 'app/shares/shares.service' ; /**
 * Undo Approval Shares Account Component
 */ @ Component ( { selector : 'mifosx-undo-approval-shares-account' , templateUrl : './undo-approval-shares-account.component.html' , styleUrls : [ './undo-approval-shares-account.component.scss' ] } ) export class UndoApprovalSharesAccountComponent { /** Shares Account Id */ accountId : any ; param { SharesService } sharesService param { ActivatedRoute } route param { Router } router constructor ( private sharesService , private route , private router ) { this . accountId = this . route . parent . snapshot . params [ 'shareAccountId' ] ; } /**
     * Submits the form and undo the approval of share account,
     * if successful redirects to the share account.
     */ submit ( ) { this . sharesService . executeSharesAccountCommand ( this . accountId , 'undoapproval' , { } ) . subscribe ( ( ) => { this . router . navigate ( [ '../../' ] , { relativeTo : this . route } ) ; } ) ; } }