"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9587],{29587:(T,_,r)=>{r.r(_),r.d(_,{TransactionHistoryPage:()=>b});var c=r(60177),l=r(89417),i=r(36375),g=r(45312),n=r(54438),d=r(20891);function h(t,e){if(1&t){const o=n.RV6();n.j41(0,"ion-header")(1,"ion-toolbar",3)(2,"ion-buttons",4)(3,"ion-button",5),n.bIt("click",function(){n.eBV(o);const s=n.XpG(2);return n.Njj(s.goBack())}),n.nrm(4,"ion-icon",6),n.k0s()(),n.j41(5,"ion-title"),n.EFF(6),n.k0s()()()}2&t&&(n.R7$(6),n.JRh("Transaction History"))}function u(t,e){if(1&t){const o=n.RV6();n.j41(0,"ion-header")(1,"ion-toolbar",3)(2,"ion-buttons",4)(3,"ion-button",5),n.bIt("click",function(){n.eBV(o);const s=n.XpG(2);return n.Njj(s.goBack())}),n.nrm(4,"ion-icon",6),n.k0s()(),n.j41(5,"ion-title"),n.EFF(6),n.k0s()()()}2&t&&(n.R7$(6),n.JRh("Transaction History"))}function m(t,e){if(1&t&&(n.j41(0,"ion-chip",13),n.EFF(1),n.k0s()),2&t){const o=n.XpG().$implicit;n.R7$(),n.SpI("",o.order_payment_status_name," ")}}function p(t,e){if(1&t&&(n.j41(0,"ion-card",9)(1,"ion-grid")(2,"ion-row")(3,"ion-col",10)(4,"ion-label"),n.EFF(5,"Batch start date:\xa0"),n.j41(6,"b"),n.EFF(7),n.k0s()()(),n.j41(8,"ion-col",11),n.DNE(9,m,2,1,"ion-chip",12),n.k0s()(),n.j41(10,"ion-row")(11,"ion-label"),n.EFF(12,"Order Id:\xa0"),n.j41(13,"b"),n.EFF(14),n.k0s()()(),n.j41(15,"ion-row")(16,"ion-label"),n.EFF(17,"Course Name:\xa0"),n.j41(18,"b"),n.EFF(19),n.k0s()()(),n.j41(20,"ion-row")(21,"ion-label"),n.EFF(22,"Batch Name:\xa0"),n.j41(23,"b"),n.EFF(24),n.k0s()()(),n.j41(25,"ion-row")(26,"ion-label"),n.EFF(27,"Amount:\xa0"),n.j41(28,"b"),n.EFF(29),n.k0s()()()()()),2&t){const o=e.$implicit;n.R7$(7),n.JRh(o.batch_start_date),n.R7$(2),n.Y8G("ngIf",o.order_payment_status_name),n.R7$(5),n.JRh(o.order_id),n.R7$(5),n.JRh(o.course_name),n.R7$(5),n.JRh(o.batch_name),n.R7$(5),n.JRh(o.order_amount)}}function f(t,e){if(1&t&&(n.j41(0,"ion-content")(1,"ion-grid"),n.DNE(2,p,30,6,"ion-card",7),n.k0s(),n.nrm(3,"ion-grid",8),n.k0s()),2&t){const o=n.XpG(2);n.R7$(2),n.Y8G("ngForOf",o.trasaction)}}function E(t,e){if(1&t&&(n.j41(0,"div",1),n.DNE(1,h,7,1,"ion-header",2)(2,u,7,1,"ion-header",2)(3,f,4,1,"ion-content",2),n.k0s()),2&t){const o=n.XpG();n.R7$(),n.Y8G("ngIf","Sadhak"===o.roleName),n.R7$(),n.Y8G("ngIf","Trainer"===o.roleName),n.R7$(),n.Y8G("ngIf","Sadhak"===o.roleName)}}let b=(()=>{var t;class e{constructor(a){this.apiRequest=a,this.forMobile=g.c.forMobile,this.trasaction=[]}ngOnInit(){}ionViewWillEnter(){this.currentUser=JSON.parse(sessionStorage.getItem("user")||"{}"),this.roleName=sessionStorage.getItem("roleName")||"{}",this.getTransactionHistory()}getTransactionHistory(){this.apiRequest.get(`transaction/get_student_transactions/${this.currentUser.user_id}`).subscribe(a=>{console.log(a),this.trasaction=a.data.list})}goBack(){window.history.back()}}return(t=e).\u0275fac=function(a){return new(a||t)(n.rXU(d.x))},t.\u0275cmp=n.VBU({type:t,selectors:[["app-transaction-history"]],standalone:!0,features:[n.aNF],decls:1,vars:1,consts:[["class","mobile","style","height:100%",4,"ngIf"],[1,"mobile",2,"height","100%"],[4,"ngIf"],["color","primary"],["slot","start"],["color","light",3,"click"],["name","chevron-back-outline"],["class","card1",4,"ngFor","ngForOf"],[2,"margin-bottom","2rem"],[1,"card1"],["size","8"],["size","4"],["class","status",4,"ngIf"],[1,"status"]],template:function(a,s){1&a&&n.DNE(0,E,4,3,"div",0),2&a&&n.Y8G("ngIf",s.forMobile)},dependencies:[i.bv,i.Jm,i.QW,i.b_,i.ZB,i.hU,i.W9,i.lO,i.eU,i.iq,i.he,i.ln,i.BC,i.ai,c.MD,c.Sq,c.bT,l.YN],styles:["ion-card.card1[_ngcontent-%COMP%]{height:8rem;align-content:center;margin:15px 5px;border-radius:12px!important;position:relative;padding-left:10px;box-shadow:0 10px 10px var(--ion-color-light)}.status[_ngcontent-%COMP%]{position:absolute;right:0;top:-15px}ion-chip[_ngcontent-%COMP%]{color:#ff893f;background-color:#ffebf0;height:15px}"]}),e})()}}]);