PageSourceSearch

https://www.zoonegara.my/_nuxt/IdlZ0DlP.js

js zoonegara.my collected 2026-10-02 10:49:47 UTC 5,363 bytes, 1 lines download raw bytes

1import{_ as y}from"./B-e2qB3q.js";import{_ as V}from"./EjZwOCvG.js";import{V as v,w as N,i as q,o as w,c as A,e as r,f as t,g as n,l as d,b as l,k as X,Q as P,Y as U,j as R,x as k,E as C}from"./BqlVcf9b.js";import{s as m}from"./D7eJNWt1.js";import{s as F}from"./xrCnwt3G.js";import{s as T}from"./C51LfDk6.js";import{_ as $}from"./C677CEWB.js";import{q as j}from"./DhHIMxL1.js";import"./CvyV-D1A.js";import"./BZ8Ga3jb.js";import"./Cr-qX6MY.js";import"./BpxYJhK9.js";import"./Pbubhgxt.js";import"./CvWtsUxR.js";import"./BSMyznhV.js";import"./CdlPS3v-.js";const S={class:"rounded-2xl bg-neutrals-50 p-6"},D={class:"mb-6 grid grid-cols-1 gap-6 md:grid-cols-2"},E={class:"flex flex-col gap-4"},B={class:"flex flex-col gap-4"},O={class:"mb-6 grid grid-cols-1 gap-6 md:grid-cols-3"},z={class:"flex flex-col gap-4"},L={class:"flex flex-col gap-4"},M={class:"flex flex-col gap-4"},Y={class:"mb-6 grid grid-cols-1 gap-6 md:grid-cols-2"},H={class:"mb-6 flex flex-col gap-4"},I={class:"flex justify-center"},J={class:"flex justify-center"},me={__name:"FormStudentTraining",props:{formEmail:{type:String,default:"[email protected]"}},async setup(Q){let u,c;const f=k(null),b=v(),{data:g}=([u,c]=N(()=>q("student-training-form-roles",()=>j("studentTrainingRoles").order("order","ASC").all())),u=await u,c(),u),_=R(()=>g.value?.map(i=>i.title)||[]),o=U({fullName:null,role:null,passport:null,email:null,phone:null,resume:null,transcript:null,about:null,is_processing:!1});async function h(){try{if(o.is_processing=!0,!o.fullName||!o.phone||!o.email||!o.role||!o.about||!o.resume||!o.transcript){alert("Please fill in all required fields.");return}const i=f.value?.getResponse();if(!i){alert("Please complete the reCAPTCHA verification");return}const e=new FormData;e.append("fullName",o.fullName),e.append("role",o.role),e.append("passport",o.passport),e.append("email",o.email),e.append("phone",o.phone),e.append("about",o.about||""),e.append("recaptcha_token",i),o.resume?.[0]&&e.append("resume",o.resume[0]),o.transcript?.[0]&&e.append("transcript",o.transcript[0]);const a=await fetch(`${C().public.apiDomain}/api/webforms/zoonegara-student-training`,{method:"POST",headers:{Accept:"application/json"},body:e});if(a.ok)f.value?.reset(),b.push("/thank-you");else{const{message:p}=await a.json();console.error("Notification error:",p),alert(p||"An error occurred. Please try again.")}}catch(i){console.error("Error sending notification:",i)}finally{o.is_processing=!1}}return(i,e)=>{const a=y,p=V,x=X;return w(),A("div",null,[r("form",{class:"mx-auto max-w-4xl space-y-8",onSubmit:P(h,["prevent"])},[r("div",S,[r("div",D,[r("div",E,[t(a,{"html-for":"fullName",required:!0},{default:n(()=>[...e[8]||(e[8]=[d("Full Name",-1)])]),_:1}),t(l(m),{id:"fullName",modelValue:l(o).fullName,"onUpdate:modelValue":e[0]||(e[0]=s=>l(o).fullName=s),placeholder:"John Doe",fluid:"",required:"",disabled:l(o).is_processing},null,8,["modelValue","disabled"])]),r("div",B,[t(a,{"html-for":"role",required:!0},{default:n(()=>[...e[9]||(e[9]=[d("Apply Role",-1)])]),_:1}),t(l(F),{"input-id":"role",modelValue:l(o).role,"onUpdate:modelValue":e[1]||(e[1]=s=>l(o).role=s),options:l(_),placeholder:"Animal Management / Zoology",fluid:"",disabled:l(o).is_processing},null,8,["modelValue","options","disabled"])])]),r("div",O,[r("div",z,[t(a,{"html-for":"passport",required:!0},{default:n(()=>[...e[10]||(e[10]=[d("IC / Passport No.",-1)])]),_:1}),t(l(m),{id:"passport",modelValue:l(o).passport,"onUpdate:modelValue":e[2]||(e[2]=s=>l(o).passport=s),placeholder:"XXXXXX-XX-XXXX",fluid:"",required:"",disabled:l(o).is_processing},null,8,["modelValue","disabled"])]),r("div",L,[t(a,{"html-for":"email",required:!0},{default:n(()=>[...e[11]||(e[11]=[d("Email Address",-1)])]),_:1}),t(l(m),{id:"email",modelValue:l(o).email,"onUpdate:modelValue":e[3]||(e[3]=s=>l(o).email=s),type:"email",placeholder:"[email protected]",fluid:"",required:"",disabled:l(o).is_processing},null,8,["modelValue","disabled"])]),r("div",M,[t(a,{"html-for":"phone",required:!0},{default:n(()=>[...e[12]||(e[12]=[d("Phone Number",-1)])]),_:1}),t(l(m),{id:"phone",modelValue:l(o).phone,"onUpdate:modelValue":e[4]||(e[4]=s=>l(o).phone=s),type:"tel",placeholder:"+60 12-345 6789",fluid:"",required:"",disabled:l(o).is_processing},null,8,["modelValue","disabled"])])]),r("div",Y,[t(p,{label:"Resume (PDF)",required:!0,accept:".pdf","onUpdate:files":e[5]||(e[5]=s=>l(o).resume=s)}),t(p,{label:"Latest Academic Transcript",required:!0,accept:".pdf","onUpdate:files":e[6]||(e[6]=s=>l(o).transcript=s)})]),r("div",H,[t(a,{"html-for":"about",required:!0},{default:n(()=>[...e[13]||(e[13]=[d("Tell Us About Yourself",-1)])]),_:1}),t(l(T),{id:"about",modelValue:l(o).about,"onUpdate:modelValue":e[7]||
1(e[7]=s=>l(o).about=s),placeholder:"Who are you and what experience do you have?",rows:"4",fluid:"",disabled:l(o).is_processing},null,8,["modelValue","disabled"])]),e[14]||(e[14]=r("p",{class:"text-small font-semibold italic text-body"}," Note: Please ensure that the application is submitted at least 1 month before the proposed internship start date. Only shortlisted candidates will be contacted for further consideration. ",-1))]),r("div",I,[t($,{ref_key:"recaptchaRef",ref:f},null,512)]),r("div",J,[t(x,{type:"submit"},{default:n(()=>[...e[15]||(e[15]=[d("Submit Application",-1)])]),_:1})])],32)])}}};export{me as default};

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.