PageSourceSearch

https://fasttrackapp.biz/assets/AdminFeedbackPage-2a1ddfa9.js

js fasttrackapp.biz collected 2026-10-02 16:01:31 UTC 4,877 bytes, 1 lines download raw bytes

1import{r as t,j as a}from"./react-vendor-2456d756.js";import{U as N}from"./UserAvatar-1e3e8539.js";import{S as _,E as S,B as h,P as k}from"./AdminShared-23669f86.js";import{A as C}from"./AppVersionBadge-6f11298e.js";import{g as E,u as D}from"./feedbackService-e8d85d74.js";import{h as R}from"./index-109ef59a.js";import{az as A}from"./lucide-a6f07388.js";import"./NameBadges-da81af1c.js";import"./dynamicBadgeIcons-d6336a9f.js";import"./utils-e0408a98.js";import"./adminEntityUrl-385ecbe6.js";import"./sentry-2cabdd57.js";import"./supabase-e274f090.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"84e0629e1e011ac8c99cdc99289c0cc630b75609"};var o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="c1d8b7b4-aa0c-4a72-b53f-826e3c34c9de",s._sentryDebugIdIdentifier="sentry-dbid-c1d8b7b4-aa0c-4a72-b53f-826e3c34c9de")}catch{}})();const B={general_feedback:"#00FF7F",bug_report:"#2DD4BF",feature_request:"#3B82F6",other:"#888"},P={new:"#2DD4BF",reviewed:"#F59E0B",resolved:"#00FF7F"},Q=()=>{const[s,o]=t.useState([]),[p,v]=t.useState(0),[m,x]=t.useState(!0),[n,y]=t.useState(""),[d,j]=t.useState(""),[i,w]=t.useState("newest"),[c,l]=t.useState(0),[g,f]=t.useState(null),u=t.useCallback(async()=>{x(!0);try{const{feedback:e,total:r}=await E({status:n||void 0,category:d||void 0,sort:i,page:c});o(e),v(r)}catch(e){console.error("Feedback load error:",e)}x(!1)},[n,d,i,c]);t.useEffect(()=>{u()},[u]);const b=async(e,r)=>{f(e);try{await D(e,r),await u()}catch{alert("Failed to update status")}f(null)},F=Math.ceil(p/20);return a.jsxs("div",{children:[a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[a.jsxs("select",{value:n,onChange:e=>{y(e.target.value),l(0)},className:"bg-[#1a1a1a] border border-[#2a2a2a] rounded-lg px-3 py-2 text-gray-300 text-sm focus:outline-none",children:[a.jsx("option",{value:"",children:"All Statuses"}),a.jsx("option",{value:"new",children:"New"}),a.jsx("option",{value:"reviewed",children:"Reviewed"}),a.jsx("option",{value:"resolved",children:"Resolved"})]}),a.jsxs("select",{value:d,onChange:e=>{j(e.target.value),l(0)},className:"bg-[#1a1a1a] border border-[#2a2a2a] rounded-lg px-3 py-2 text-gray-300 text-sm focus:outline-none",children:[a.jsx("option",{value:"",children:"All Categories"}),a.jsx("option",{value:"general_feedback",children:"General"}),a.jsx("option",{value:"bug_report",children:"Bug Report"}),a.jsx("option",{value:"feature_request",children:"Feature Request"}),a.jsx("option",{value:"other",children:"Other"})]}),a.jsxs("select",{value:i,onChange:e=>{w(e.target.value),l(0)},className:"bg-[#1a1a1a] border border-[#2a2a2a] rounded-lg px-3 py-2 text-gray-300 text-sm focus:outline-none ml-auto",children:[a.jsx("option",{value:"newest",children:"Newest First"}),a.jsx("option",{value:"oldest",children:"Oldest First"})]})]}),m?a.jsx(_,{}):s.length===0?a.jsx(S,{text:"No feedback found"}):a.jsxs("div",{className:"space-y-3",children:[s.map(e=>a.jsxs("div",{className:"bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-4",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-wrap",children:[e.profile&&a.jsx(N,{profile:e.profile,size:"xs",linkToProfile:!0}),a.jsx("span",{className:"text-white text-sm font-medium truncate",children:e.profile?.display_name||e.profile?.username||"Unknown"}),e.profile&&a.jsx(C,{version:e.profile.app_version}),a.jsx(h,{color:B[e.category]||"#888",children:e.category?.replace("_"," ")}),a.jsx(h,{color:P[e.status]||"#888",children:e.status})]}),a.jsx("span",{className:"text-gray-600 text-xs whitespace-nowrap",children:R(e.created_at)})]}),e.rating&&a.jsx("div",{className:"flex gap-0.5 mb-2",children:[1,2,3,4,5].map(r=>a.jsx(A,{size:14,className:r<=e.rating?"text-yellow-400 fill-yellow-400":"text-gray-700"},r))}),a.jsx("p",{className:"text-gray-300 text-sm mb-3 whitespace-pre-wrap",children:e.comment}),e.device_info&&a.jsxs("p",{className:"text-gray-600 text-[11px] mb-3 truncate",children:[e.app_version,", ",e.device_info.length>80?e.device_info.slice(0,80)+"...":e.device_info]}),a.jsxs("div",{className:"flex gap-2",children:[e.status==="new"&&a.jsx("button",{onClick:()=>b(e.id,"reviewed"),disabled:g===e.id,className:"px-3 py-1 rounded-lg bg-yellow-500/10 text-yellow-400 text-xs font-medium hover:bg-yellow-500/20 transition-colors disabled:opacity-50",children:"Mark Reviewed"}),e.status!=="resolved"&&a.jsx("button",{onClick:()=>b(e.id,"resolved"),disabled:g===e.id,className:"px-3 py-1 rounded-lg bg-[#00FF7F]/10 text-[#00FF7F] text-xs font-medium hover:bg-[#00FF7F]/20 transition-colors disabled:opacity-50",children:"Resolve"})]})]},e.id)),a.jsx(k,{page:c+1,totalPages:F,onPageChange:e=>l(e-1)})]})]})};export{Q 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.