PageSourceSearch

https://brigada49eve.com/assets/DoctrineReadinessView-CV_4U-rR.js

js brigada49eve.com collected 2026-10-07 19:58:21 UTC 5,786 bytes, 1 lines download raw bytes

1import{d as q,p as S,c as s,a as e,g as c,t as n,h as o,F as m,r as b,i as d,bD as C,o as l,n as u,x as D}from"./index-BKzBHk8x.js";const B={class:"p-4 md:p-6 space-y-6"},N={class:"flex items-center justify-between"},V={class:"text-surface-400 text-sm mt-0.5"},j={key:0,class:"text-surface-600"},z={key:0,class:"flex justify-center py-12 text-surface-400"},E={key:1,class:"text-center py-12 text-surface-500"},L={key:2,class:"space-y-4"},R=["onClick"],$={class:"shrink-0 relative w-12 h-12"},A={class:"w-12 h-12 -rotate-90",viewBox:"0 0 36 36"},F=["stroke","stroke-dasharray"],T={class:"flex-1 min-w-0"},M={class:"font-semibold text-surface-50"},P={class:"text-xs text-surface-400 mt-0.5"},W={key:0,class:"text-amber-400 ml-2"},G={class:"w-32 shrink-0"},H={class:"h-1.5 rounded-full bg-surface-800 overflow-hidden"},I={key:0,class:"border-t border-surface-800"},J={key:0,class:"px-5 py-2 bg-amber-500/10 border-b border-amber-500/20 flex flex-wrap gap-2"},K={class:"overflow-x-auto"},O={class:"w-full text-xs"},Q={class:"px-5 py-2 text-surface-200"},U={class:"px-3 py-2 text-surface-400"},X={key:0,class:"text-sky-300/80"},Y={key:1,class:"ml-1 text-surface-500"},Z={key:2,class:"text-surface-600"},ee={class:"px-3 py-2 text-center"},te={class:"text-surface-600"},se={class:"px-3 py-2"},le={key:0,class:"flex items-center gap-1.5"},ae={class:"text-surface-200"},re={key:1,class:"text-surface-600"},oe=q({__name:"DoctrineReadinessView",setup(ie){const _=d([]),x=d(0),f=d(null),h=d(!0),p=d(new Set);async function y(){try{const r=await C.get("/api/fleet-plans/doctrine-readiness");_.value=r.data.doctrines,x.value=r.data.members_with_skills,f.value=r.data.synced_at}finally{h.value=!1}}function v(r){const i=new Set(p.value);i.has(r)?i.delete(r):i.add(r),p.value=i}function g(r){return r>=80?"bg-emerald-500":r>=50?"bg-amber-500":"bg-red-500"}function k(r){return r>=80?"text-emerald-400":r>=50?"text-amber-400":"text-red-400"}function w(r){return r?new Date(r).toLocaleString("es-ES",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}return S(y),(r,i)=>(l(),s("div",B,[e("div",N,[e("div",null,[i[0]||(i[0]=e("h1",{class:"text-2xl font-semibold flex items-center gap-2"},[e("i",{class:"pi pi-check-circle text-primary-400"}),c(" Readiness de Doctrinas ")],-1)),e("p",V,[c(n(x.value)+" miembros con skills sincronizadas ",1),f.value?(l(),s("span",j," · última sync "+n(w(f.value)),1)):o("",!0)])])]),h.value?(l(),s("div",z,[...i[1]||(i[1]=[e("i",{class:"pi pi-spin pi-spinner text-2xl"},null,-1)])])):_.value.length===0?(l(),s("div",E,[...i[2]||(i[2]=[e("i",{class:"pi pi-sitemap text-3xl mb-3 block"},null,-1),c(" No hay doctrinas definidas. Crea fleet plans primero. ",-1)])])):(l(),s("div",L,[(l(!0),s(m,null,b(_.value,a=>(l(),s("div",{key:a.plan_id,class:"rounded-xl border border-surface-800 bg-surface-900/50 overflow-hidden"},[e("button",{class:"w-full flex items-center gap-4 px-5 py-4 hover:bg-surface-800/30 transition-colors cursor-pointer text-left",onClick:t=>v(a.plan_id)},[e("div",$,[(l(),s("svg",A,[i[3]||(i[3]=e("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:"#1e293b","stroke-width":"3"},null,-1)),e("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:a.readiness_pct>=80?"#10b981":a.readiness_pct>=50?"#f59e0b":"#ef4444","stroke-width":"3","stroke-linecap":"round","stroke-dasharray":`${a.readiness_pct} 100`},null,8,F)])),e("span",{class:u(["absolute inset-0 flex items-center justify-center text-[10px] font-bold",k(a.readiness_pct)])},n(a.readiness_pct)+"%",3)]),e("div",T,[e("p",M,n(a.name),1),e("p",P,[c(n(a.fillable_slots)+"/"+n(a.total_slots)+" slots cubribles ",1),a.gaps.length?(l(),s("span",W,"· "+n(a.gaps.length)+" sin cobertura",1)):o("",!0)])]),e("div",G,[e("div",H,[e("div",{class:u(["h-full rounded-full transition-all",g(a.readiness_pct)]),style:D({width:a.readiness_pct+"%"})},null,6)])]),e("i",{class:u(["pi text-surface-500 transition-transform duration-200 shrink-0",p.value.has(a.plan_id)?"pi-chevron-up":"pi-chevron-down"])},null,2)],8,R),p.value.has(a.plan_id)?(l(),s("div",I,[a.gaps.length?(l(),s("div",J,[(l(!0),s(m,null,b(a.gaps,t=>(l(),s("span",{key:t.label,class:"inline-flex items-center gap-1 text-[11px] bg-amber-500/15 text-amber-300 border border-amber-500/30 px-2 py-0.5 rounded-full"},[i[4]||(i[4]=e("i",{class:"pi pi-exclamation-circle text-[9px]"},null,-1)),c(" "+n(t.label)+": "+n(t.reason),1)]))),128))])):o("",!0),e("div",K,[e("table",O,[i[5]||(i[5]=e("thead",null,[e("tr",{class:"border-b border-surface-800 text-surface-500"},[e("th",{class:"px-5 py-2 text-left font-medium"},"Slot"),e("th",{class:"px-3 py-2 text-left font-medium"},"Requisito"),e("th",{class:"px-3 py-2 text-center font-medium"},"Pilotos elegibles"),e("th",{class:"px-3 py-2 text-left font-medium"},"Asignado")])],-1)),e("tbody",null,[(l(!0),s(m,null,b(a.slots,t=>(l(),s("tr",{key:t.slot_id,class:"border-b border-surface-800/40 last:border-0 hover:bg-surface-800/20"},[e("td",Q,n(t.label||"—"),1),e("td",U,[t.required_class?(l(),s("span",X,n(t.required_class),1)):o("",!0),t.required_skill_name?(l(),s("span",Y," + "+n(t.required_skill_name)+" "+n(t.required_skill_level?`Nv${t.required_skill_level}`:""),1)):o("",!0),!t.required_class&&!t.required_skill_name?(l(),s("span",Z,"Libre")):o("",!0)]),e("td",ee,[e("span",{class:u(["font-medium",t.eligible_count===0?"text-red-400":t.eligible_count<3?"text-amber-400":"text-emerald-400"])},n(t.eligible_count),3),e("span",te," / "+n(x.value),1)]),e("td",se,[t.assigned_character_name?(l(),s("span",le,[e("span",ae,n(t.assigned_character_name),1),e("i",{class:u(["pi text-[10px]",t.assigned_is_eligible?"pi-check-circle text-emerald-400":"pi-times-circle text-red-400"])},null,2)])):(l(),s("span",re,"—"))])]))),128))])])])])):o("",!0)]))),128))]))]))}});
1export{oe 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.