1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8828],{6251:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let a=t(52707).A.create({baseURL:"https://salonify.mx/api",headers:{"Content-Type":"application/json"}});a.interceptors.request.use(e=>{{let s=localStorage.getItem("salonify_token");s&&(e.headers.Authorization=`Bearer ${s}`)}return e.data instanceof FormData&&e.headers.delete("Content-Type"),e}),a.interceptors.response.use(e=>e,e=>{if(e.response?.status===401){let s=e.config?.url||"";s.includes("/auth/login")||s.includes("/auth/register")||(localStorage.removeItem("salonify_token"),localStorage.removeItem("salonify_user"),window.location.href="/login")}return Promise.reject(e)});let l=a},47016:(e,s,t)=>{Promise.resolve().then(t.bind(t,95726))},95726:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>o});var a=t(95155),l=t(12115),r=t(6251);let n={inappropriate:"Contenido inapropiado",aggression:"Agresiones / lenguaje ofensivo",not_my_venue:"No corresponde al sal\xf3n",false_info:"Informaci\xf3n falsa",other:"Otro motivo"},i={pending:{label:"Pendiente",color:"#D97706",bg:"#FFFBEB"},resolved:{label:"Resuelto",color:"#16A34A",bg:"#F0FDF4"},dismissed:{label:"Descartado",color:"#6B7280",bg:"#F9FAFB"}};function o(){let[e,s]=(0,l.useState)([]),[t,o]=(0,l.useState)(!0),[d,c]=(0,l.useState)("pending"),[x,m]=(0,l.useState)(null),[p,u]=(0,l.useState)(null),[b,h]=(0,l.useState)(""),g=(0,l.useCallback)(async()=>{o(!0);try{let{data:e}=await r.A.get(`/admin/review-reports?status=${d}`);s(e)}catch{s([])}finally{o(!1)}},[d]);(0,l.useEffect)(()=>{g()},[g]);let f=async e=>{if(p){m(p.id);try{await r.A.patch(`/admin/review-reports/${p.id}/${e}`,{adminNote:b.trim()||void 0}),s(e=>e.filter(e=>e.id!==p.id)),u(null),h("")}catch(e){alert(e?.response?.data?.message||"Error al procesar")}finally{m(null)}}};return(0,a.jsxs)("div",{className:"p-6 max-w-5xl",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h1",{className:"text-2xl font-black text-gray-900",children:"\uD83D\uDEA9 Rese\xf1as reportadas"}),(0,a.jsx)("p",{className:"text-sm mt-0.5",style:{color:"#6B6B6B"},children:"Rese\xf1as que los due\xf1os de sal\xf3n han reportado por contenido inapropiado o incorrecto."})]}),(0,a.jsx)("div",{className:"flex gap-2 mb-6",children:["pending","resolved","dismissed"].map(e=>(0,a.jsx)("button",{onClick:()=>c(e),className:"px-4 py-1.5 rounded-full text-sm font-semibold transition-colors",style:d===e?{background:"#6A3EF5",color:"#fff"}:{background:"#F3F4F6",color:"#6B7280"},children:i[e]?.label},e))}),t?(0,a.jsx)("div",{className:"text-center py-16 text-gray-400",children:"Cargando..."}):0===e.length?(0,a.jsxs)("div",{className:"bg-white rounded-2xl p-12 text-center",style:{border:"1px solid #E8E8E8"},children:[(0,a.jsx)("div",{className:"text-4xl mb-3",children:"â
"}),(0,a.jsxs)("p",{className:"font-semibold text-gray-900",children:["Sin reportes ","pending"===d?"pendientes":"resolved"===d?"resueltos":"descartados"]})]}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>{let s=i[e.status]||i.pending;return(0,a.jsxs)("div",{className:"bg-white rounded-2xl p-5",style:{border:"1px solid #E8E8E8"},children:[(0,a.jsx)("div",{className:"flex items-start justify-between gap-4 mb-4",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:"text-sm font-bold text-gray-900",children:e.venue?.name}),(0,a.jsx)("span",{className:"text-xs text-gray-400",children:e.venue?.city}),(0,a.jsx)("span",{className:"text-xs font-semibold px-2 py-0.5 rounded-full",style:{background:s.bg,color:s.color},children:s.label})]}),(0,a.jsxs)("p",{className:"text-xs text-gray-500",children:["Reportado por ",(0,a.jsx)("strong",{children:e.reportedBy?.name})," \xb7 ",new Date(e.createdAt).toLocaleDateString("es-MX",{year:"numeric",month:"short",day:"numeric"})]})]})}),(0,a.jsxs)("div",{className:"rounded-xl p-4 mb-4",style:{background:"#F9FAFB",border:"1px solid #E8E8E8"},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold text-white shrink-0",style:{background:"linear-gradient(135deg, #6A3EF5, #8B5CF6)"},children:e.review?.client?.name?.charAt(0).toUpperCase()||"?"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:e.review?.client?.name}),(0,a.jsx)("span",{className:"text-xs text-gray-400 ml-1",children:e.review?.client?.email})]})]}),(0,a.jsx)("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(s=>(0,a.jsx)("span",{className:"text-sm",style:{color:s<=(e.review?.rating||0)?"#F5B700":"#E5E7EB"},children:"â
"},s))})]}),e.review?.comment&&(0,a.jsx)("p",{className:"text-sm text-gray-700 leading-relaxed",children:e.review.comment})]}),(0,a.jsxs)("div",{className:"rounded-xl p-3 mb-4",style:{background:"#FEF2F2",border:"1px solid #FECACA"},children:[(0,a.jsxs)("p",{className:"text-xs font-bold text-red-700 mb-0.5",children:["Motivo: ",n[e.reason]||e.reason]}),e.description&&(0,a.jsx)("p",{className:"text-xs text-red-600",children:e.description})]}),e.adminNote&&(0,a.jsxs)("div",{className:"rounded-xl p-3 mb-4",style:{background:"#F0FDF4",border:"1px solid #BBF7D0"},children:[(0,a.jsx)("p",{className:"text-xs font-bold text-green-700 mb-0.5",children:"Nota del admin"}),(0,a.jsx)("p",{className:"text-xs text-green-600",children:e.adminNote})]}),"pending"===e.status&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>{u({id:e.id,action:"resolve"}),h("")},disabled:x===e.id,className:"flex-1 py-2 rounded-xl text-sm font-bold text-white disabled:opacity-50",style:{background:"#EF4444"},children:"\uD83D\uDDD1ï¸ Eliminar rese\xf1a"}),(0,a.jsx)("button",{onClick:()=>{u({id:e.id,action:"dismiss"}),h("")},disabled:x===e.id,className:"flex-1 py-2 rounded-xl text-sm font-semibold border border-gray-200 text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:"Descartar reporte"})]})]},e.id)})}),p&&(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:(0,a.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-md p-6",children:[(0,a.jsx)("h3",{className:"text-base font-bold text-gray-900 mb-1",children:"resolve"===p.action?"\uD83D\uDDD1ï¸ Eliminar rese\xf1a":"Descartar reporte"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:"resolve"===p.action?"La rese\xf1a ser\xe1 eliminada permanentemente y el reporte se marcar\xe1 como resuelto.":"El reporte se descartar\xe1 y la rese\xf1a permanecer\xe1 publicada."}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-1",children:["Nota interna ",(0,a.jsx)("span",{className:"font-normal text-gray-400",children:"(opcional)"})]}),(0,a.jsx)("textarea",{value:b,onChange:e=>h(e.target.value),rows:2,placeholder:"Raz\xf3n de la decisi\xf3n...",className:"w-full border border-gray-200 rounded-xl px-3 py-2 text-sm focus:outline-none focus:border-purple-400 resize-none"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>u(null),className:"flex-1 py-2.5 rounded-xl border border-gray-200 text-sm font-semibold text-gray-600",children:"Cancelar"}),(0,a.jsx)("button",{onClick:()=>f(p.action),disabled:!!x,className:"flex-1 py-2.5 rounded-xl text-sm font-bold text-white disabled:opacity-50",style:{background:"resolve"===p.action?"#EF4444":"#6A3EF5"},children:x?"Procesando...":"Confirmar"})]})]})})]})}}},e=>{e.O(0,[2707,8441,4398,7358],()=>e(e.s=47016)),_N_E=e.O()}]);
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.