PageSourceSearch

https://fonoglobal.com.ar/build/assets/Notifications-CI18e-0x.js

js fonoglobal.com.ar collected 2026-10-08 18:35:09 UTC 4,057 bytes, 1 lines download raw bytes

1import{h as C,l as N,r as j}from"./app-Cb5rOCm2.js";import{u as B}from"./useTechNotifications-DD_fvB1E.js";import{o as P,g as a,i as l,B as b,j as e,C as t,D as V,l as d,t as r,F as _,k as M,E as f}from"./runtime-dom.esm-bundler-DPZ-bGLk.js";import"./index-BetwS6Uc.js";const A={class:"min-h-screen bg-slate-50"},z={class:"bg-white border-b border-slate-200 sticky top-0 z-20"},D={class:"px-4 py-3 flex items-center justify-between"},E={class:"flex items-center gap-3"},F={class:"flex items-center gap-2"},I={key:0,class:"text-xs font-semibold text-rose-600"},L={class:"max-w-2xl mx-auto p-4 space-y-3"},R={key:0,class:"text-center text-slate-400 py-12"},S={key:1,class:"text-center text-slate-400 py-12"},H=["onClick"],T={class:"flex items-start gap-3"},W={class:"flex-1 min-w-0"},$={class:"flex items-center justify-between gap-2"},q={class:"text-xs text-slate-400 flex-shrink-0"},G={class:"text-sm text-slate-600 mt-1 whitespace-pre-line"},J={key:0,class:"text-xs text-blue-600 mt-2"},K={key:2,class:"flex items-center justify-between pt-4"},O=["disabled"],Q={class:"text-xs text-slate-500"},U=["disabled"],oe={__name:"Notifications",setup(X){const{items:u,unreadCount:m,loading:x,currentPage:n,lastPage:c,fetchItems:g,markRead:v,markAllRead:p}=B();async function h(o=1){await g({page:o,perPage:20})}P(()=>h(1));async function k(){n.value<c.value&&await h(n.value+1)}async function w(){n.value>1&&await h(n.value-1)}async function y(o){o.unread&&await v(o.id),o.url&&(o.url.startsWith("/")?j.visit(o.url):window.location.href=o.url)}return(o,i)=>(l(),a(_,null,[b(t(C),{title:"Notificaciones"}),e("div",A,[e("header",z,[e("div",D,[e("div",E,[b(t(N),{href:"/tecnico",class:"p-2 -ml-2 rounded-lg hover:bg-slate-100"},{default:V(()=>[...i[1]||(i[1]=[e("svg",{class:"w-6 h-6 text-slate-600",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)])]),_:1}),i[2]||(i[2]=e("h1",{class:"text-lg font-bold text-slate-900"},"Notificaciones",-1))]),e("div",F,[t(m)>0?(l(),a("span",I,r(t(m))+" sin leer ",1)):d("",!0),t(m)>0?(l(),a("button",{key:1,onClick:i[0]||(i[0]=(...s)=>t(p)&&t(p)(...s)),class:"text-xs font-semibold text-blue-600 hover:underline px-2 py-1"}," Marcar todas leídas ")):d("",!0)])])]),e("main",L,[t(x)&&t(u).length===0?(l(),a("div",R,"Cargando…")):t(u).length===0?(l(),a("div",S,[...i[3]||(i[3]=[e("svg",{class:"w-16 h-16 mx-auto mb-3 text-slate-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})],-1),e("p",{class:"text-sm"},"No tenés notificaciones todavía.",-1)])])):d("",!0),(l(!0),a(_,null,M(t(u),s=>(l(),a("div",{key:s.id,onClick:Y=>y(s),class:f(["bg-white rounded-2xl shadow-sm border p-4 cursor-pointer transition-all hover:shadow-md",s.unread?"border-blue-200 bg-blue-50/40":"border-slate-200"])},[e("div",T,[e("div",{class:f(["mt-1.5 w-2.5 h-2.5 rounded-full flex-shrink-0",s.unread?"bg-rose-500":"bg-slate-300"])},null,2),e("div",W,[e("div",$,[e("h3",{class:f(["text-sm",s.unread?"font-bold text-slate-900":"font-medium text-slate-700"])},r(s.title),3),e("span",q,r(s.sent_at),1)]),e("p",G,r(s.body),1),s.url?(l(),a("p",J,"→ "+r(s.url),1)):d("",!0)])])],10,H))),128)),t(c)>1?(l(),a("div",K,[e("button",{onClick:w,disabled:t(n)<=1||t(x),class:"px-3 py-1.5 rounded-lg bg-white border border-slate-300 text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed hover:bg-slate-50"},"← Anterior",8,O),e("span",Q,"Página "+r(t(n))+" de "+r(t(c)),1),e("button",{onClick:k,disabled:t(n)>=t(c)||t(x),class:"px-3 py-1.5 rounded-lg bg-white border border-slate-300 text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed hover:bg-slate-50"},"Siguiente →",8,U)])):d("",!0)])])],64))}};export{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.