PageSourceSearch

https://schoolface.cl/build/assets/SchoolDetail-LHW4-Ewj.js

js schoolface.cl collected 2026-10-02 01:20:48 UTC 27,185 bytes, 10 lines download raw bytes

1import{i as r,j as pe,q as fe,A as xe,x as ge,c as l,d,b as H,a as e,t as n,n as $,f as p,e as W,w as Q,r as he,k as w,F as X,E as Y,l as b,v as C,p as Z,s as we,o as a,G as ye}from"./app-BjrRHTkE.js";import{u as be}from"./schools-D9cSDY_b.js";const ke={key:0,class:"space-y-4"},_e={key:1},Ce={class:"bg-white rounded-xl shadow-sm p-6 mb-6"},Me={class:"flex flex-col lg:flex-row lg:items-start lg:justify-between gap-6"},je={class:"flex items-start space-x-4"},$e={class:"relative group"},Se={class:"w-20 h-20 rounded-xl bg-gradient-to-br from-purple-500 to-green-400 flex items-center justify-center overflow-hidden flex-shrink-0"},Le=["src","alt"],Ve={key:1,class:"text-3xl font-bold text-white"},Be={class:"flex items-center space-x-3"},ze={class:"text-2xl font-bold text-gray-900"},Ee={class:"text-gray-500 mt-1"},Ne={class:"font-medium"},Ae={key:0},De={key:0,class:"text-sm text-gray-400 mt-1"},He={key:1,class:"text-sm text-gray-400 mt-1"},Ue={class:"flex flex-col sm:flex-row lg:flex-col gap-4"},Ie={class:"flex space-x-6"},Oe={class:"text-center"},Pe={class:"text-2xl font-bold text-purple-600"},Ge={class:"text-center"},Te={class:"text-2xl font-bold text-blue-600"},Fe={class:"flex space-x-2"},qe={class:"bg-white rounded-xl shadow-sm"},Re={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 p-6 border-b border-gray-200"},Je={class:"flex space-x-2"},Ke=["disabled"],We={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24"},Qe={key:1,class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Xe={key:0,class:"p-6"},Ye=["onDragstart","onDragover","onDrop"],Ze={class:"flex items-center space-x-4"},et={class:"w-8 h-8 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center text-sm font-semibold"},tt={class:"flex items-center space-x-2"},st={class:"font-medium text-gray-900"},ot={class:"text-sm text-gray-500"},lt={key:0,class:"px-2 py-0.5 text-xs rounded-full bg-yellow-100 text-yellow-700"},at={class:"text-sm text-gray-400"},nt={class:"flex items-center space-x-2"},rt=["onClick"],it=["onClick"],dt={key:0,class:"mt-4 flex justify-end"},ut=["disabled"],ct={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24"},vt={key:1,class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},mt={key:1,class:"p-12 text-center"},pt={class:"flex justify-center space-x-3"},ft=["disabled"],xt={class:"bg-white rounded-xl shadow-sm mt-6"},gt={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 p-6 border-b border-gray-200"},ht={key:0,class:"p-6"},wt={class:"space-y-2"},yt={class:"flex items-center space-x-4"},bt={class:"flex items-center space-x-2"},kt={class:"font-medium text-gray-900"},_t={key:0,class:"text-sm text-gray-500"},Ct={key:1,class:"px-2 py-0.5 text-xs rounded-full bg-yellow-100 text-yellow-700"},Mt={key:0,class:"text-sm text-gray-400 mt-0.5"},jt={class:"flex items-center space-x-2"},$t=["onClick"],St=["onClick"],Lt={key:1,class:"p-12 text-center"},Vt={key:2,class:"bg-white rounded-xl shadow-sm p-12 text-center"},Bt={class:"flex items-center justify-center min-h-screen px-4"},zt={class:"relative bg-white rounded-xl shadow-xl max-w-md w-full p-6 z-10"},Et={class:"flex items-center justify-between mb-6"},Nt={class:"text-xl font-semibold text-gray-900"},At={key:0,class:"text-red-500 text-sm mt-1"},Dt={key:0,class:"text-red-500 text-sm mt-1"},Ht={class:"flex items-center"},Ut={class:"flex justify-end space-x-3 pt-4"},It=["disabled"],Ot={key:0,class:"flex items-center"},Pt={key:1},Gt={class:"flex items-center justify-center min-h-screen px-4"},Tt={class:"relative bg-white rounded-xl shadow-xl max-w-md w-full p-6 z-10"},Ft={class:"flex items-center justify-between mb-6"},qt={class:"text-xl font-semibold text-gray-900"},Rt={key:0,class:"text-red-500 text-sm mt-1"},Jt={key:0,class:"text-red-500 text-sm mt-1"},Kt={class:"flex items-center space-x-3"},Wt={key:0,class:"text-red-500 text-sm mt-1"},Qt={key:0,class:"text-red-500 text-sm mt-1"},Xt={class:"flex items-center"},Yt={class:"flex justify-end space-x-3 pt-4"},Zt=["disabled"],es={key:0,class:"flex items-center"},ts={key:1},as={__name:"SchoolDetail",setup(ss){const ee=fe();we();const m=be(),U=r(!0),i=r(null),f=r([]),I=r([]),O=r(!1),M=r(null),L=r(!1),x=r({}),g=r({name:"",short_name:"",is_active:!0}),k=r(null),V=r(null),P=r([]),B=r(!1),z=r(!1),S=r(!1),J=r(null),G=r(!1),j=r(null),E=r(!1),c=r({}),u=r({name:"",short_name:"",color:"#6366f1",description:"",is_active:!0}),v=pe(()=>ee.params.id);function te(s){return s.split(" ").slice(0,2).map(t=>t[0]).join("").toUpperCase()}async function T(){U.value=!0;try{const s=await m.fetchSchool(v.value);s.success?(i.value=s.data,await Promise.all([N(),F()])):i.value=null}finally{U.value=!1}}async function N(){const s=await m.fetchLevels(v.value);s.success&&(f.value=s.data,P.value=s.data.map(t=>
1t.id),B.value=!1)}async function F(){const s=await m.fetchSubjects(v.value);s.success&&(I.value=s.data)}function q(s=null){M.value=s,s?g.value={name:s.name,short_name:s.short_name,is_active:s.is_active}:g.value={name:"",short_name:"",is_active:!0},x.value={},O.value=!0}function A(){O.value=!1,M.value=null,x.value={}}async function se(){L.value=!0,x.value={};try{let s;M.value?s=await m.updateLevel(v.value,M.value.id,g.value):s=await m.createLevel(v.value,g.value),s.success?(A(),await N(),window.$toast&&window.$toast.success(s.message)):(x.value=s.errors||{},window.$toast&&window.$toast.error(s.message))}finally{L.value=!1}}async function oe(s){if(!confirm(`¿Estas seguro de eliminar el nivel "${s.name}"?
2
3Esta accion no se puede deshacer.`))return;const t=await m.deleteLevel(v.value,s.id);t.success?(await N(),window.$toast&&window.$toast.success(t.message)):window.$toast&&window.$toast.error(t.message)}async function K(){if(confirm(`¿Deseas crear la plantilla estandar del sistema educativo chileno?
4
5Se crearan los siguientes niveles:
6- Pre-Kinder y Kinder
7- 1° a 8° Basico
8- 1° a 4° Medio`)){S.value=!0;try{const s=await m.bulkCreateLevels(v.value,"chilean_standard");s.success?(await N(),window.$toast&&window.$toast.success(s.message)):window.$toast&&window.$toast.error(s.message)}finally{S.value=!1}}}function le(s,t){k.value=t,s.dataTransfer.effectAllowed="move"}function ae(s,t){k.value!==t&&(V.value=t)}function ne(s,t){if(k.value!==null&&k.value!==t){const y=f.value.splice(k.value,1)[0];f.value.splice(t,0,y);const o=f.value.map(h=>h.id);B.value=JSON.stringify(o)!==JSON.stringify(P.value)}V.value=null,k.value=null}function re(){V.value=null,k.value=null}async function ie(){z.value=!0;try{const s=await m.reorderLevels(v.value,f.value);s.success?(P.value=f.value.map(t=>t.id),B.value=!1,window.$toast&&window.$toast.success(s.message)):window.$toast&&window.$toast.error(s.message)}finally{z.value=!1}}function de(){var s;(s=J.value)==null||s.click()}async function ue(s){var o;const t=(o=s.target.files)==null?void 0:o[0];if(!t)return;if(!t.type.startsWith("image/")){window.$toast&&window.$toast.error("El archivo debe ser una imagen");return}if(t.size>2*1024*1024){window.$toast&&window.$toast.error("La imagen no debe superar los 2MB");return}const y=await m.uploadLogo(v.value,t);y.success?(i.value.logo_url=y.data.logo_url,window.$toast&&window.$toast.success(y.message)):window.$toast&&window.$toast.error(y.message),s.target.value=""}function R(s=null){j.value=s,s?u.value={name:s.name,short_name:s.short_name||"",color:s.color||"#6366f1",description:s.description||"",is_active:s.is_active}:u.value={name:"",short_name:"",color:"#6366f1",description:"",is_active:!0},c.value={},G.value=!0}function D(){G.value=!1,j.value=null,c.value={}}async function ce(){E.value=!0,c.value={};try{let s;j.value?s=await m.updateSubject(v.value,j.value.id,u.value):s=await m.createSubject(v.value,u.value),s.success?(D(),await F(),window.$toast&&window.$toast.success(s.message)):(s.errors&&(c.value=s.errors),window.$toast&&window.$toast.error(s.message))}finally{E.value=!1}}async function ve(s){if(!confirm(`¿Deseas eliminar la asignatura "${s.name}"?
9
10Si tiene entradas de libreta asociadas, solo sera desactivada.`))return;const t=await m.deleteSubject(v.value,s.id);t.success?(await F(),window.$toast&&window.$toast.success(t.message)):window.$toast&&window.$toast.error(t.message)}function me(){T()}return xe(()=>{T(),window.addEventListener("admin-refresh",me)}),ge(v,s=>{s&&T()}),(s,t)=>{const y=he("router-link");return a(),l("div",null,[U.value&&!i.value?(a(),l("div",ke,[...t[14]||(t[14]=[H('<div class="bg-white rounded-xl shadow-sm p-6 animate-pulse"><div class="flex items-center space-x-4"><div class="w-20 h-20 bg-gray-200 rounded-lg"></div><div class="flex-1"><div class="h-6 bg-gray-200 rounded w-64 mb-2"></div><div class="h-4 bg-gray-200 rounded w-40"></div></div></div></div>',1)])])):i.value?(a(),l("div",_e,[e("div",Ce,[e("div",Me,[e("div",je,[e("div",$e,[e("div",Se,[i.value.logo_url?(a(),l("img",{key:0,src:i.value.logo_url,alt:i.value.name,class:"w-full h-full object-cover"},null,8,Le)):(a(),l("span",Ve,n(te(i.value.name)),1))]),e("div",{class:"absolute inset-0 bg-black bg-opacity-50 rounded-xl flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",onClick:de}
10,[...t[15]||(t[15]=[e("svg",{class:"w-6 h-6 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])]),e("input",{ref_key:"logoInput",ref:J,type:"file",accept:"image/*",class:"hidden-input",onChange:ue},null,544)]),e("div",null,[e("div",Be,[e("h1",ze,n(i.value.name),1),e("span",{class:$([i.value.is_active?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700","px-2 py-0.5 text-xs rounded-full"])},n(i.value.is_active?"Activo":"Inactivo"),3)]),e("p",Ee,[e("span",Ne,n(i.value.code),1),i.value.email?(a(),l("span",Ae," • "+n(i.value.email),1)):d("",!0)]),i.value.phone?(a(),l("p",De,[t[16]||(t[16]=e("svg",{class:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})],-1)),p(" "+n(i.value.phone),1)])):d("",!0),i.value.address?(a(),l("p",He,[t[17]||(t[17]=e("svg",{class:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),p(" "+n(i.value.address),1)])):d("",!0)])]),e("div",Ue,[e("div",Ie,[e("div",Oe,[e("p",Pe,n(f.value.length),1),t[18]||(t[18]=e("p",{class:"text-xs text-gray-500"},"Niveles",-1))]),e("div",Ge,[e("p",Te,n(i.value.courses_count||0),1),t[19]||(t[19]=e("p",{class:"text-xs text-gray-500"},"Cursos",-1))])]),e("div",Fe,[W(y,{to:"/admin/schools",class:"px-4 py-2 border border-gray-300 rounded-lg text-gray-600 hover:bg-gray-50 transition-colors"},{default:Q(()=>[...t[20]||(t[20]=[p(" Volver ",-1)])]),_:1})])])])]),e("div",qe,[e("div",Re,[t[25]||(t[25]=e("div",null,[e("h2",{class:"text-xl font-semibold text-gray-900"},"Niveles Educativos"),e("p",{class:"text-sm text-gray-500 mt-1"},"Configura los niveles de educacion del colegio")],-1)),e("div",Je,[f.value.length===0?(a(),l("button",{key:0,onClick:K,disabled:S.value,class:"px-4 py-2 border border-purple-300 text-purple-600 rounded-lg hover:bg-purple-50 transition-colors flex items-center disabled:opacity-50"},[S.value?(a(),l("svg",We,[...t[21]||(t[21]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(a(),l("svg",Qe,[...t[22]||(t[22]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"},null,-1)])])),t[23]||(t[23]=p(" Crear Plantilla Chilena ",-1))],8,Ke)):d("",!0),e("button",{onClick:t[0]||(t[0]=o=>q()),class:"btn-schoolface flex items-center"},[...t[24]||(t[24]=[e("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})],-1),p(" Nuevo Nivel ",-1)])])])]),f.value.length?(a(),l("div",Xe,[t[32]||(t[32]=e("p",{class:"text-sm text-gray-500 mb-4"},[e("svg",{class:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),p(" Arrastra los niveles para reordenarlos ")],-1)),e("div",{class:"space-y-2",onDragover:t[1]||(t[1]=w(()=>{},["prevent"]))},[(a(!0),l(X,null,Y(f.value,(o,h)=>(a(),l("div",{key:o.id,draggable:"true",onDragstart:_=>le(_,h),onDragover:w(_=>ae(_,h),["prevent"]),onDrop:_=>ne(_,h),onDragend:re,class:$(["flex items-center justify-between p-4 bg-gray-50 rounded-lg border border-gray-200 cursor-move hover:border-purple-300 transition-colors",{"border-purple-500 bg-purple-50":V.value===h,"opacity-50":k.value===h}])},[e("div",Ze,[t[26]||(t[26]=e("div",{class:"text-gray-400 cursor-grab"},[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8h16M4 16h16"})])],-1)),e("div",et,n(h+1),1),e("div",null,[e("div",tt,[e("span",st,n(o.name),1),e("span",ot,"("+n(o.short_name)+")",1),o.is_active?d("",!0):(a(),l("span",lt," Inactivo "))]),e("p",at,n(o.courses_count||0)+" cursos asociados ",1)])]),e("div",nt,[e("button",{onClick:w(_=>q(o),["stop"]),class:"p-2 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",title:"Editar"},[...t[27]||(t[27]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,rt),e("button",{onClick:w(_=>oe(o),["stop"]),class:"p-2 text-gray-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors",title:"Eliminar"},[...t[28]||(t[28]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,it)])],42,Ye))),128))],32),B.value?(a(),l("div",dt,[e("button",{onClick:ie,disabled:z.value,class:"btn-schoolface flex items-center"},[z.value?(a(),l("svg",ct,[...t[29]||(t[29]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(a(),l("svg",vt,[...t[30]||(t[30]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])),t[31]||(t[31]=p(" Guardar Orden ",-1))],8,ut)])):d("",!0)])):(a(),l("div",mt,[t[33]||(t[33]=H('<div class="w-16 h-16 mx-auto rounded-full bg-purple-100 flex items-center justify-center mb-4"><svg class="w-8 h-8 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
10<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path></svg></div><h3 class="text-lg font-semibold text-gray-900 mb-2">Sin niveles educativos</h3><p class="text-gray-500 mb-6 max-w-md mx-auto"> Este colegio no tiene niveles educativos configurados. Puedes crear la plantilla estandar chilena o agregar niveles manualmente. </p>',3)),e("div",pt,[e("button",{onClick:K,disabled:S.value,class:"px-4 py-2 border border-purple-300 text-purple-600 rounded-lg hover:bg-purple-50 transition-colors"}," Usar Plantilla Chilena ",8,ft),e("button",{onClick:t[2]||(t[2]=o=>q()),class:"btn-schoolface"}," Crear Nivel Manual ")])]))]),e("div",xt,[e("div",gt,[t[35]||(t[35]=e("div",null,[e("h2",{class:"text-xl font-semibold text-gray-900"},"Asignaturas"),e("p",{class:"text-sm text-gray-500 mt-1"},"Configura las asignaturas para filtrar materias en la libreta")],-1)),e("button",{onClick:t[3]||(t[3]=o=>R()),class:"btn-schoolface flex items-center"},[...t[34]||(t[34]=[e("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})],-1),p(" Nueva Asignatura ",-1)])])]),I.value.length?(a(),l("div",ht,[e("div",wt,[(a(!0),l(X,null,Y(I.value,o=>(a(),l("div",{key:o.id,class:"flex items-center justify-between p-4 bg-gray-50 rounded-lg border border-gray-200 hover:border-purple-300 transition-colors"},[e("div",yt,[e("div",{class:"w-4 h-4 rounded-full",style:ye({backgroundColor:o.color})},null,4),e("div",null,[e("div",bt,[e("span",kt,n(o.name),1),o.short_name?(a(),l("span",_t,"("+n(o.short_name)+")",1)):d("",!0),o.is_active?d("",!0):(a(),l("span",Ct," Inactiva "))]),o.description?(a(),l("p",Mt,n(o.description),1)):d("",!0)])]),e("div",jt,[e("button",{onClick:w(h=>R(o),["stop"]),class:"p-2 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",title:"Editar"},[...t[36]||(t[36]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,$t),e("button",{onClick:w(h=>ve(o),["stop"]),class:"p-2 text-gray-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors",title:"Eliminar"},[...t[37]||(t[37]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,St)])]))),128))])])):(a(),l("div",Lt,[t[38]||(t[38]=H('<div class="w-16 h-16 mx-auto rounded-full bg-blue-100 flex items-center justify-center mb-4"><svg class="w-8 h-8 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg></div><h3 class="text-lg font-semibold text-gray-900 mb-2">Sin asignaturas</h3><p class="text-gray-500 mb-6 max-w-md mx-auto"> Este colegio no tiene asignaturas configuradas. Las asignaturas permiten a los estudiantes categorizar el material de estudio en la libreta. </p>',3)),e("button",{onClick:t[4]||(t[4]=o=>R()),class:"btn-schoolface"}," Crear Primera Asignatura ")]))])])):(a(),l("div",Vt,[t[40]||(t[40]=H('<div class="w-16 h-16 mx-auto rounded-full bg-red-100 flex items-center justify-center mb-4"><svg class="w-8 h-8 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg></div><h3 class="text-lg font-semibold text-gray-900 mb-2">
10Error al cargar el colegio</h3><p class="text-gray-500 mb-6">No se pudo obtener la informacion del colegio solicitado.</p>',3)),W(y,{to:"/admin/schools",class:"btn-schoolface inline-flex items-center"},{default:Q(()=>[...t[39]||(t[39]=[e("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1),p(" Volver a Colegios ",-1)])]),_:1})])),O.value?(a(),l("div",{key:3,class:"fixed inset-0 z-50 overflow-y-auto",onClick:w(A,["self"])},[e("div",Bt,[t[47]||(t[47]=e("div",{class:"fixed inset-0 bg-black bg-opacity-50 transition-opacity"},null,-1)),e("div",zt,[e("div",Et,[e("h2",Nt,n(M.value?"Editar Nivel":"Nuevo Nivel Educativo"),1),e("button",{onClick:A,class:"text-gray-400 hover:text-gray-600"},[...t[41]||(t[41]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e("form",{onSubmit:w(se,["prevent"]),class:"space-y-4"},[e("div",null,[t[42]||(t[42]=e("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Nombre completo * ",-1)),b(e("input",{"onUpdate:modelValue":t[5]||(t[5]=o=>g.value.name=o),type:"text",class:$(["input-schoolface w-full",{"border-red-500":x.value.name}]),placeholder:"Ej: Primero Basico"},null,2),[[C,g.value.name]]),x.value.name?(a(),l("p",At,n(x.value.name[0]),1)):d("",!0)]),e("div",null,[t[43]||(t[43]=e("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Nombre corto * ",-1)),b(e("input",{"onUpdate:modelValue":t[6]||(t[6]=o=>g.value.short_name=o),type:"text",class:$(["input-schoolface w-full",{"border-red-500":x.value.short_name}]),placeholder:"Ej: 1°B"},null,2),[[C,g.value.short_name]]),x.value.short_name?(a(),l("p",Dt,n(x.value.short_name[0]),1)):d("",!0),t[44]||(t[44]=e("p",{class:"text-gray-400 text-xs mt-1"},"Abreviacion que se mostrara en listados",-1))]),e("div",Ht,[b(e("input",{type:"checkbox","onUpdate:modelValue":t[7]||(t[7]=o=>g.value.is_active=o),id:"level_is_active",class:"w-4 h-4 text-purple-600 rounded border-gray-300 focus:ring-purple-500"},null,512),[[Z,g.value.is_active]]),t[45]||(t[45]=e("label",{for:"level_is_active",class:"ml-2 text-sm text-gray-700"}," Nivel activo ",-1))]),e("div",Ut,[e("button",{type:"button",onClick:A,class:"px-4 py-2 text-gray-600 hover:text-gray-800"}," Cancelar "),e("button",{type:"submit",class:"btn-schoolface",disabled:L.value},[L.value?(a(),l("span",Ot,[...t[46]||(t[46]=[e("svg",{class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),p(" Guardando... ",-1)])])):(a(),l("span",Pt,n(M.value?"Guardar Cambios":"Crear Nivel"),1))],8,It)])],32)])])])):d("",!0),G.value?(a(),l("div",{key:4,class:"fixed inset-0 z-50 overflow-y-auto",onClick:w(D,["self"])},[e("div",Gt,[t[56]||(t[56]=e("div",{class:"fixed inset-0 bg-black bg-opacity-50 transition-opacity"},null,-1)),e("div",Tt,[e("div",Ft,[e("h2",qt,n(j.value?"Editar Asignatura":"Nueva Asignatura"),1),e("button",{onClick:D,class:"text-gray-400 hover:text-gray-600"},[...t[48]||(t[48]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e("form",{onSubmit:w(ce,["prevent"]),class:"space-y-4"},[e("div",null,[t[49]||(t[49]=e("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Nombre * ",-1)),b(e("input",{"onUpdate:modelValue":t[8]||(t[8]=o=>u.value.name=o),type:"text",class:$(["input-schoolface w-full",{"border-red-500":c.value.name}]),placeholder:"Ej: Matematicas"},null,2),[[C,u.value.name]]),c.value.name?(a(),l("p",Rt,n(c.value.name[0]),1)):d("",!0)]),e("div",null,[t[50]||
10(t[50]=e("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Nombre corto ",-1)),b(e("input",{"onUpdate:modelValue":t[9]||(t[9]=o=>u.value.short_name=o),type:"text",class:$(["input-schoolface w-full",{"border-red-500":c.value.short_name}]),placeholder:"Ej: MAT"},null,2),[[C,u.value.short_name]]),c.value.short_name?(a(),l("p",Jt,n(c.value.short_name[0]),1)):d("",!0),t[51]||(t[51]=e("p",{class:"text-gray-400 text-xs mt-1"},"Abreviacion que se mostrara en chips",-1))]),e("div",null,[t[52]||(t[52]=e("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Color ",-1)),e("div",Kt,[b(e("input",{"onUpdate:modelValue":t[10]||(t[10]=o=>u.value.color=o),type:"color",class:"w-12 h-10 rounded border border-gray-300 cursor-pointer"},null,512),[[C,u.value.color]]),b(e("input",{"onUpdate:modelValue":t[11]||(t[11]=o=>u.value.color=o),type:"text",class:"input-schoolface flex-1",placeholder:"#6366f1"},null,512),[[C,u.value.color]])]),c.value.color?(a(),l("p",Wt,n(c.value.color[0]),1)):d("",!0)]),e("div",null,[t[53]||(t[53]=e("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Descripcion ",-1)),b(e("textarea",{"onUpdate:modelValue":t[12]||(t[12]=o=>u.value.description=o),class:"input-schoolface w-full",rows:"2",placeholder:"Descripcion opcional..."},null,512),[[C,u.value.description]]),c.value.description?(a(),l("p",Qt,n(c.value.description[0]),1)):d("",!0)]),e("div",Xt,[b(e("input",{type:"checkbox","onUpdate:modelValue":t[13]||(t[13]=o=>u.value.is_active=o),id:"subject_is_active",class:"w-4 h-4 text-purple-600 rounded border-gray-300 focus:ring-purple-500"},null,512),[[Z,u.value.is_active]]),t[54]||(t[54]=e("label",{for:"subject_is_active",class:"ml-2 text-sm text-gray-700"}," Asignatura activa ",-1))]),e("div",Yt,[e("button",{type:"button",onClick:D,class:"px-4 py-2 text-gray-600 hover:text-gray-800"}," Cancelar "),e("button",{type:"submit",class:"btn-schoolface",disabled:E.value},[E.value?(a(),l("span",es,[...t[55]||(t[55]=[e("svg",{class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),p(" Guardando... ",-1)])])):(a(),l("span",ts,n(j.value?"Guardar Cambios":"Crear Asignatura"),1))],8,Zt)])],32)])])])):d("",!0)])}}};export{as 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.