1import{A as k}from"./AuthenticatedLayout-BgPi6SK7.js";import{i as w,Z as V,r as u,f as s,a as f,w as g,b as t,d as P,l as a,v as i,o as d,F as c,j as p,t as n,p as b,g as B,m as C,e as y,T as L}from"./app-BFBm0Bhp.js";import{P as U}from"./PrimaryButton-DQRXstZk.js";import{_ as A}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ApplicationLogo-BDZZhcqx.js";import"./NavLink-XJ1F9B8R.js";import"./TextOutline-DJTNpM16.js";import"./DocumentTextOutline-CSPECrKp.js";import"./InformationCircleOutline-B09VKpeu.js";const S={components:{AuthenticatedLayout:k,Head:V,Link:w,PrimaryButton:U},props:{schoolprogram:{type:Object,default:()=>({})},schools:{type:Array,default:()=>[]},faculties:{type:Array,default:()=>[]}},setup(l){const o=L({programm_name:l.schoolprogram.programm_name||"",programm_description:l.schoolprogram.programm_description||"",programm_theme:l.schoolprogram.programm_theme||"",programm_variants:l.schoolprogram.programm_variants||"",active:!!l.schoolprogram.active,valid_till:l.schoolprogram.valid_till||null,school_code:l.schoolprogram.school_code||null,faculty_id:l.schoolprogram.faculty_id||null});return{form:o,submit:()=>{l.schoolprogram.id?o.put(route("admin.schoolprograms.update",{schoolprogram:l.schoolprogram.id})):o.post(route("admin.schoolprograms.store"))}}}},N={class:"flex"},F={class:"font-semibold text-xl text-gray-800 leading-tight"},M={class:"py-12"},T={class:"max-w-4xl mx-auto sm:px-6 lg:px-8"},j={class:"bg-white overflow-hidden shadow-sm sm:rounded-lg p-6"},q=["value"],D=["value"],E={class:"mb-4"},H={key:0,class:"text-red-500 text-sm"},O={class:"flex justify-end mt-4"};function Z(l,o,m,e,z,G){const x=u("Head"),v=u("Link"),_=u("PrimaryButton"),h=u("AuthenticatedLayout");return d(),s(c,null,[f(x,{title:m.schoolprogram.id?"Edit Program":"Create Program"},null,8,["title"]),f(h,null,{header:g(()=>[t("div",N,[t("h2",F,n(m.schoolprogram.id?"Edit Program":"Create Program"),1),o[10]||(o[10]=t("div",{class:"flex-grow"},null,-1)),f(v,{class:"btn btn-secondary",href:l.route("admin.schoolprograms.index")},{default:g(()=>[...o[9]||(o[9]=[y("Back to List",-1)])]),_:1},8,["href"])])]),default:g(()=>[t("div",M,[t("div",T,[t("div",j,[t("form",{onSubmit:o[8]||(o[8]=P((...r)=>e.submit&&e.submit(...r),["prevent"]))},[o[14]||(o[14]=t("label",{for:"name",class:"block text-sm font-medium text-gray-700"},"Name",-1)),a(t("input",{id:"name","onUpdate:modelValue":o[0]||(o[0]=r=>e.form.programm_name=r),type:"text",class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm",required:""},null,512),[[i,e.form.programm_name]]),o[15]||(o[15]=t("label",{for:"school",class:"block text-sm font-medium text-gray-700 mt-4"},"School",-1)),a(t("select",{id:"school","onUpdate:modelValue":o[1]||(o[1]=r=>e.form.school_code=r),class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm",required:""},[o[11]||(o[11]=t("option",{value:"",disabled:""},"Select a school",-1)),(d(!0),s(c,null,p(m.schools,r=>(d(),s("option",{key:r.school_code,value:r.school_code},n(r.school_name),9,q))),128))],512),[[b,e.form.school_code]]),o[16]||(o[16]=t("label",{for:"faculty",class:"block text-sm font-medium text-gray-700 mt-4"},"Faculty",-1)),a(t("select",{id:"faculty","onUpdate:modelValue":o[2]||(o[2]=r=>e.form.faculty_id=r),class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm"},[o[12]||(o[12]=t("option",{value:"",disabled:""},"Select a faculty",-1)),(d(!0),s(c,null,p(m.faculties,r=>(d(),s("option",{key:r.id,value:r.id},n(r.faculty_name),9,D))),128))],512),[[b,e.form.faculty_id]]),o[17]||(o[17]=t("label",{for:"description",class:"block text-sm font-medium text-gray-700 mt-4"},"Description",-1)),a(t("textarea",{id:"programm_description","onUpdate:modelValue":o[3]||(o[3]=r=>e.form.programm_description=r),class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm"},null,512),[[i,e.form.programm_description]]),o[18]||(o[18]=t("label",{for:"programm_theme",class:"block text-sm font-medium text-gray-700 mt-4"},"Theme",-1)),a(t("textarea",{id:"programm_theme","onUpdate:modelValue":o[4]||(o[4]=r=>e.form.programm_theme=r),class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm"},null,512),[[i,e.form.programm_theme]]),o[19]||(o[19]=t("label",{for:"programm_variants",class:"block text-sm font-medium text-gray-700 mt-4"},"Variants",-1)),a(t("textarea",{id:"programm_variants","onUpdate:modelValue":o[5]||(o[5]=r=>e.form.programm_variants=r),class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm"},null,512),[[i,e.form.programm_variants]]),o[20]||(o[20]=t("label",{for:"valid_till",class:"block text-sm font-medium text-gray-700 mt-4"},"Valid",-1)),a(t("input",{id:"valid_till","onUpdate:modelValue":o[6]||(o[6]=r=>e.form.valid_till=r),type:"text",class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm",required:""},null,512),[[i,e.form.valid_till]]),t("div",E,[o[13]||(o[13]=t("label",{for:"active",class:"block text-sm font-medium text-gray-700"},"Active",-1)),a(t("input",{id:"active",type:"checkbox","onUpdate:modelValue":o[7]||(o[7]=r=>e.form.active=r),class:"form-checkbox h-5 w-5 text-indigo-600"},null,512),[[C,e.form.active]]),e.form.errors.active?(d(),s("span",H,n(e.form.errors.active),1)):B("",!0)]),t("div",O,[f(_,{type:"submit",disabled:e.form.processing},{default:g(()=>[y(n(m.schoolprogram.id?"Save Changes":"Create Program"),1)]),_:1},8,["disabled"])])],32)])])])]),_:1})],64)}const oo=A(S,[["render",Z]]);
1export{oo 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.