PageSourceSearch

https://www.aat.org.uk/csr/chunk-F5RW3EKV.js

js aat.org.uk collected 2026-10-03 21:41:31 UTC 6,252 bytes, 1 lines download raw bytes

1import{c as q}from"./chunk-7BWMJXIZ.js";import{f as L,g as D,i as A}from"./chunk-V5ROTH2O.js";import"./chunk-OZC5JFZK.js";import{a as N}from"./chunk-JEL6HJ7P.js";import{Fb as R,U as k,Xa as E,Y as O,aa as x,dc as T,ea as M,ec as j,ha as B,hc as F,q as I}from"./chunk-YQOD7X2Z.js";import"./chunk-563YFTIG.js";import"./chunk-36JN3LZY.js";import"./chunk-WPHW6CRH.js";import"./chunk-76O7YCWW.js";import{c as P,e as w}from"./chunk-YYIIKC2W.js";import"./chunk-3WYGUSDH.js";import"./chunk-LU7SZU5X.js";import"./chunk-PO2RDVKE.js";import{Pb as h,Rb as y,Wb as d,Xb as s,Yb as c,Zb as l,db as p,jc as v,lc as S,pb as r,pc as _,qc as C,rc as b,ta as g,ub as f,zc as u}from"./chunk-3URBZWPM.js";import"./chunk-ODN5LVDJ.js";function z(a,o){if(a&1&&l(0,"fab-notification",2),a&2){let Q=S();d("isNotificationOpen",!0)("notification",Q.notificationMsie)}}var ce=(()=>{let o=class o{constructor(t,e,i,n,m,G,U,W,V,Y,$){this.formDataService=t,this.router=e,this.authService=i,this.basketService=n,this.registrationService=m,this.layoutSetupService=G,this.route=U,this.gtmService=W,this.contactService=V,this.document=Y,this.pricingService=$,this.localStorageForm=null,this.submitted=!1,this.enabled=!1,this.showAddressSelect=!1,this.addressTypeError=!1,this.addressError=!1,this.stepsConfig={currentStep:5,maxSteps:5,stepTitle:"Payment",highlightCurrentStep:!0},this.notificationMsie={type:"warning",message:"If you're using Internet Explorer then some functionality or features may not work as expected. Before continuing please make sure your internet browser is up-to-date - we recommend using the recent version of an Edge, Safari, Chrome or Firefox browser.",glyph:"warning",fullWidth:!0},this.msie=!1,this.showNotification=!1,this.errorNotification={type:"error",message:"Your payment was unsuccessful. Try with a different card or alternative payment method.",fullWidth:!0,glyph:"error",closeNotification:!1},this.paymentOptions={label:"Please select a payment option",name:"payment",required:!0,options:[{label:"Card",name:"card",image:!0}]},this.layoutSetupService.setLayoutConfig({showLeftNav:!1,headerLinks:[]}),sessionStorage.getItem("reg_skip")&&(this.stepsConfig.currentStep-=1,this.stepsConfig.maxSteps-=1)}ngOnInit(){this.msie=window.document.documentMode;let t=sessionStorage.getItem("registrationId");this.registrationService.setRegistrationIds(this.contactService.contactId(),t),this.registrationService.getRegistration().subscribe(e=>{e?.programmeRegistration&&e?.basket?.length===1&&(!["2aa138d7-8900-e511-a653-005056b14c6a","c24729f5-4e4d-e211-acc8-005056b14c6a"].includes(e.programmeRegistration[0].trainingProviderOrganisationId)||e.employerOrganisationId)&&this.paymentOptions.options.push({label:"Payment code",name:"code",image:!1}),this.registrationService.setRegistrationData(e)}),this.basketService.totalPriceChanged$.subscribe(e=>{(e!==void 0||e!==null)&&(this.finalPrice=e,this.paymentOptions.required=e>0)}),this.route.queryParams.subscribe(e=>{this.showNotification=!!e.dts_reference}),this.gtmService.push({event:"checkoutStep",checkoutStepName:"payment",ecommerce:{currencyCode:"GBP",checkout:{actionField:{step:5},products:this.basketService.getBasket().map(e=>({name:e.name,id:e.programmeComponentId,price:e.price}))}}}),this.pricingService.getPrices()}getBasketItems(){return this.basketService.getBasket()}goBack(){this.router.navigate(["/registration/student/declaration"])}redirectToLogin(){this.document.location.href=N.BASE_URL+"/myaat/login"}redirectToPath(t){window.location.href=t}submitForm(t){this.paymentCodeError=!1;let e=t;e&&(t.paymentType==="card"&&(e.paymentAddress={address:e.address,updateAddress:!1,updateBilling:!1}),this.registrationService.setPaymentData(e)),this.registrationService.putRegistration().subscribe({next:i=>{i&&(this.finalPrice===0&&this.registrationService.isRegReturned?this.registrationService.postRegistration().subscribe({next:n=>{n.redirectPath&&(localStorage.setItem("paymentMethod",null),this.redirectToPath(n.redirectPath))},error:()=>{console.error("registration creation error")}}):this.registrationService.postRegistration().subscribe({next:n=>{let m=n.paymentGatewayUrl||n.redirectPath;window.location.href=m},error:()=>{t.paymentCode&&(this.paymentCodeError=!0)}}))},error:()=>{console.error("registration update error")}})}};o.\u0275fac=function(e){return new(e||o)(r(q),r(w),r(I),r(O),r(B),r(M),r(P),r(k),r(x),r(g),r(L))}
1,o.\u0275cmp=f({type:o,selectors:[["app-step5"]],viewQuery:function(e,i){if(e&1&&_(R,7),e&2){let n;C(n=b())&&(i.postcodeLookupComponent=n.first)}},decls:14,vars:4,consts:[[1,"step__container"],[1,"col-12"],[3,"isNotificationOpen","notification"],[1,"payment"],[1,"step__summary"],[1,"payment__summary"],[1,"col-xs-12","col-md-6"],[1,"step__subtitle","small"],[1,"mb-3"],[3,"config"],[1,"payment__page",3,"onFormSubmit","onBackButtonClick","paymentOptions","showPaymentCodeError"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1),h(2,z,1,2,"fab-notification",2),c(),s(3,"div",3)(4,"div",4),l(5,"app-summary",5),c(),s(6,"div",6)(7,"p",7),u(8,"Register as a student"),c(),s(9,"h1",8)(10,"strong"),u(11,"Payment"),c()(),l(12,"fab-progress-indicator",9),s(13,"fab-payment-page",10),v("onFormSubmit",function(m){return i.submitForm(m)})("onBackButtonClick",function(){return i.goBack()}),c()()()()),e&2&&(p(2),y(i.msie?2:-1),p(10),d("config",i.stepsConfig),p(),d("paymentOptions",i.paymentOptions)("showPaymentCodeError",i.paymentCodeError))},dependencies:[A,D,E,F,j,T],styles:["[_ngcontent-%COMP%]:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}.payment[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.payment__summary[_ngcontent-%COMP%], .payment__page[_ngcontent-%COMP%]{width:100%}@media (min-width: 992px){.payment__summary[_ngcontent-%COMP%], .payment__page[_ngcontent-%COMP%]{width:50%}}@media (min-width: 992px){.payment[_ngcontent-%COMP%]{flex-direction:row-reverse}}@media (min-width: 992px){.step__summary[_ngcontent-%COMP%]{margin-left:8.33333333%}}.step__container[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;padding-top:10px}@media (min-width: 992px){.step__container[_ngcontent-%COMP%]{padding-top:5em}}"]});let a=o;return a})();export{ce as Step5Component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.