eAssinatura.component("planPurchaseSidePanel",{templateUrl:"/Component/planPurchaseSidePanel",bindings:{plan:"=",accountId:"<",onLoad:"&"},controllerAs:"ctrl",controller:["locale","$http","blockService","notifyService",function(n,t,i,r){function f(){t.get("/API/Fatura/ListLastInfo?contaId="+u.accountId+"&n=5").then(function(n){u.previousOrders=n.data.faturas},function(){})}var u=this;u.$onInit=function(){u.previousOrders=[];f()};u.EscolherPedido=function(f){i.block();t.get("/API/Fatura/Get?id="+f.id).then(function(t){if(u.onLoad)u.onLoad({data:t.data});i.unblock();r.info(n.getString("Home.MyCredits.RequestInformationLoadedSuccessfully"))},function(t){var u=n.getString("Home.MyCredits.ErrorRetrievingOrderInformation");i.unblock();r.errorModel(t.data,u,t.status)})}}]})