PageSourceSearch

https://venue-master-3-r-1773448163.emergent.host/_next/static/chunks/20636-9f44dcd03f36bd2a.js

js venue-master-3-r-1773448163.emergent.host collected 2026-10-03 03:22:40 UTC 15,030 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20636],{20636:(e,s,t)=>{t.r(s),t.d(s,{default:()=>N});var a=t(95155),l=t(12115),i=t(38935),r=t(39867),n=t(37586),c=t(26983),d=t(42529),x=t(16485),m=t(66955),o=t(91169),h=t(57828),u=t(20508),p=t(71871),g=t(57356),j=t(12870);let v=e=>{var s,t,i,r,n,c,d,m;let{brief:o,onClose:h,onStatusUpdate:j}=e,[v,N]=(0,l.useState)(""),y=e=>{j(o.id,e,v),h()};return(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50",onClick:h}),(0,a.jsxs)("div",{className:"relative bg-white rounded-xl shadow-2xl w-full max-w-4xl mx-4 max-h-[90vh] overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-xl font-bold text-gray-900",children:["Brief #",o.reference_number]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Submitted ",new Date(o.submitted_at).toLocaleDateString()]})]}),(0,a.jsx)("button",{onClick:h,className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,a.jsxs)("div",{className:"p-6 max-h-[70vh] overflow-y-auto",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Client Information"}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(u.A,{className:"w-4 h-4 text-gray-500"}),(0,a.jsx)("span",{className:"font-medium",children:o.client_name})]}),o.client_company&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(p.A,{className:"w-4 h-4 text-gray-500"}),(0,a.jsx)("span",{children:o.client_company})]}),(0,a.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,a.jsxs)("p",{children:["Email: ",o.client_email]}),(0,a.jsxs)("p",{children:["Phone: ",null==(s=o.contact_info)?void 0:s.phone]}),(0,a.jsxs)("p",{children:["Preferred contact: ",null==(t=o.contact_info)?void 0:t.preferredContact]})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Event Details"}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(x.A,{className:"w-4 h-4 text-gray-500"}),(0,a.jsx)("span",{className:"font-medium",children:o.event_type})]}),(0,a.jsxs)("div",{className:"text-sm text-gray-600 space-y-1",children:[(0,a.jsxs)("p",{children:["Date: ",o.event_date?new Date(o.event_date).toLocaleDateString():"TBD"]}),(0,a.jsxs)("p",{children:["Attendees: ",o.attendees]}),(0,a.jsxs)("p",{children:["Budget: ",(null==(i=o.event_details)?void 0:i.budget)||"Not specified"]})]}),(null==(r=o.event_details)?void 0:r.notes)&&(0,a.jsx)("div",{className:"pt-2 border-t",children:(0,a.jsxs)("p",{className:"text-sm text-gray-600",children:[(0,a.jsx)("strong",{children:"Notes:"})," ",o.event_details.notes]})})]})]})]}),(0,a.jsxs)("div",{className:"space-y-6",children:[o.requirements&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Requirements"}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 space-y-3",children:[(null==(n=o.requirements.catering)?void 0:n.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Catering:"}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:o.requirements.catering.join(", ")})]}),(null==(c=o.requirements.avRequirements)?void 0:c.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"AV Requirements:"}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:o.requirements.avRequirements.join(", ")})]}),(null==(d=o.requirements.accessibility)?void 0:d.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Accessibility:"}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:o.requirements.accessibility.join(", ")})]}),o.requirements.accommodation&&(0,a.jsx)("p",{className:"text-sm text-gray-600",children:"✓ Overnight accommodation required"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:["Shortlisted Venues (",o.venue_count,")"]}),(0,a.jsx)("div",{className:"space-y-2",children:null==(m=o.shortlisted_venues)?void 0:m.map((e,s)=>{var t;return(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-3",children:[(0,a.jsx)("p",{className:"font-medium",children:e.venue_name}),(0,a.jsxs)("p",{className:"text-sm text-gray-600",children:[e.venue_city," • ",null==(t=e.venue_category)?void 0:t.replace("-"," ")]})]},s)})})]})]})]}),(0,a.jsxs)("div",{className:"mt-8 pt-6 border-t",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Admin Notes"}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("textarea",{value:v,onCh
1ange:e=>N(e.target.value),placeholder:"Add notes about this brief...",rows:3,className:"w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"}),(0,a.jsxs)("div",{className:"flex gap-3",children:["new"===o.status&&(0,a.jsx)(g.$,{onClick:()=>y("in_review"),className:"bg-yellow-600 hover:bg-yellow-700 text-white",children:"Mark as In Review"}),"in_review"===o.status&&(0,a.jsx)(g.$,{onClick:()=>y("responded"),className:"bg-green-600 hover:bg-green-700 text-white",children:"Mark as Responded"}),["responded","in_review"].includes(o.status)&&(0,a.jsx)(g.$,{onClick:()=>y("closed"),variant:"outline",children:"Close Brief"}),"closed"===o.status&&(0,a.jsx)(g.$,{onClick:()=>y("new"),variant:"outline",children:"Reopen Brief"})]})]})]})]})]})]})},N=()=>{let[e,s]=(0,l.useState)([]),[t,u]=(0,l.useState)({}),[p,N]=(0,l.useState)(!0),[y,b]=(0,l.useState)(null),[f,w]=(0,l.useState)("all"),[_,k]=(0,l.useState)(!1);(0,l.useEffect)(()=>{A(),C()},[f]);let A=async()=>{try{N(!0);let e="all"===f?"".concat("","/api/briefs"):"".concat("","/api/briefs?status=").concat(f),t=await j.A.get(e);s(t.data)}catch(e){console.error("Error loading briefs:",e)}finally{N(!1)}},C=async()=>{try{let e=await j.A.get("".concat("","/api/briefs/stats/summary"));u(e.data)}catch(e){console.error("Error loading stats:",e)}},S=async function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{if(await j.A.put("".concat("","/api/briefs/").concat(e,"/status"),{status:s,admin_notes:t}),A(),C(),y&&y.id===e){let e={...y,status:s};b(e)}}catch(e){console.error("Error updating brief status:",e),alert("Failed to update brief status")}},R=async()=>{try{let e="all"===f?"".concat("","/api/briefs/export/csv"):"".concat("","/api/briefs/export/csv?status=").concat(f),s=await j.A.get(e),t=new Blob([s.data],{type:"text/csv"}),a=window.URL.createObjectURL(t),l=document.createElement("a");l.href=a,l.download="venue_briefs_".concat(f,"_").concat(new Date().toISOString().split("T")[0],".csv"),document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(a)}catch(e){console.error("Error exporting briefs:",e),alert("Failed to export briefs")}};return p?(0,a.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(i.A,{}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Venue Briefs"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Manage venue enquiry briefs and submissions"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:(0,a.jsxs)(g.$,{onClick:R,variant:"outline",className:"flex items-center gap-2",children:[(0,a.jsx)(r.A,{className:"w-4 h-4"}),"Export CSV"]})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[(0,a.jsx)("div",{className:"bg-white rounded-lg shadow p-6",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"p-2 bg-blue-100 rounded-lg",children:(0,a.jsx)(n.A,{className:"w-6 h-6 text-blue-600"})}),(0,a.jsxs)("div",{className:"ml-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-600",children:"Total Briefs"}),(0,a.jsx)("p",{className:"text-2xl font-bold text-gray-900",children:t.total_briefs||0})]})]})}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow p-6",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"p-2 bg-yellow-100 rounded-lg",children:(0,a.jsx)(c.A,{className:"w-6 h-6 text-yellow-600"})}),(0,a.jsxs)("div",{className:"ml-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-600",children:"New Briefs"}),(0,a.jsx)("p",{className:"text-2xl font-bold text-gray-900",children:t.new_briefs||0})]})]})}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow p-6",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"p-2 bg-green-100 rounded-lg",children:(0,a.jsx)(d.A,{className:"w-6 h-6 text-green-600"})}),(0,a.jsxs)("div",{className:"ml-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-600",children:"Responded"}),(0,a.jsx)("p",{className:"text-2xl font-bold text-gray-900",children:t.responded||0})]})]})}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow p-6",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"p-2 bg-purple-100 rounded-lg",children:(0,a.jsx)(x.A,{className:"w-6 h-6 text-purple-600"})}),(0,a.jsxs)("div",{className:"ml-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-600",children:"This Week"}),(0,a.jsx)("p",{className:"text-2xl font-bold text-gray-900",children:t.recent_submissions||0})]})]})})]}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(m.A,{className:"w-5 h-5 text-gray-400"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Filter by status:"}),(0,a.jsx)("div",{className:"flex gap-2",children:["all","new","in_review","responded","closed"].map(e=>(0,a.jsx)("button",{onClick:()=>w(e),className:"px-3 py-1 rounded-full text-sm font-medium ".concat(f===e?"bg-blue-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"),children:"all"===e?"All":e.replace("_"," ").replace(/\b\w/g,e=>e.toUpperCase())},e))})]})}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Brief Details"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Client"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Event"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Venues"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:["#",e.reference_number]}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:new Date(e.submitted_at).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})})]})}),(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:e.client_name}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:e.client_company||"No company"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:e.client_email})]})}),(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:e.event_type}),(0,a.jsxs)("div",{className:"text-sm text-gray-500 flex items-center",children:[(0,a.jsx)(x.A,{className:"w-4 h-4 mr-1"}),e.event_date?new Date(e.event_date).toLocaleDateString():"TBD"]}),(0,a.jsxs)("div",{className:"text-sm text-gray-500 flex items-center",children:[(0,a.jsx)(o.A,{className:"w-4 h-4 mr-1"}),e.attendees," attendees"]})]})}),(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,a.jsxs)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:[e.venue_count," venue",1!==e.venue_count?"s":""]})}),(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(e=>{let s={new:{color:"bg-blue-100 text-blue-800",label:"New"},in_review:{color:"bg-yellow-100 text-yellow-800",label:"In Review"},responded:{color:"bg-green-100 text-green-800",label:"Responded"},closed:{color:"bg-gray-100 text-gray-800",label:"Closed"}},{color:t,label:l}=s[e]||s.new;return(0,a.jsx)("span",{className:"px-2 py-1 rounded-full text-xs font-medium ".concat(t),children:l})})(e.status)}),(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{onClick:()=>{b(e),k(!0)},className:"text-blue-600 hover:text-blue-900 flex items-center gap-1",children:[(0,a.jsx)(h.A,{className:"w-4 h-4"}),"View"]}
1),"new"===e.status&&(0,a.jsx)("button",{onClick:()=>S(e.id,"in_review"),className:"text-yellow-600 hover:text-yellow-900 ml-2",children:"Review"}),"in_review"===e.status&&(0,a.jsx)("button",{onClick:()=>S(e.id,"responded"),className:"text-green-600 hover:text-green-900 ml-2",children:"Respond"})]})})]},e.id))})]})}),0===e.length&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)(n.A,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No briefs found"}),(0,a.jsx)("p",{className:"text-gray-500",children:"all"===f?"No venue briefs have been submitted yet.":'No briefs with status "'.concat(f,'" found.')})]})]}),_&&y&&(0,a.jsx)(v,{brief:y,onClose:()=>{k(!1),b(null)},onStatusUpdate:S})]})}}}]);

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.