1import{dv as o,r as h,j as e}from"./main-Bo0oayNO.js";const m="en-AU";function x(s){if(!s)return"";if(!/^\d{4}-\d{2}-\d{2}$/.test(s))return s;const l=new Date(`${s}T00:00:00Z`);if(Number.isNaN(l.getTime()))return s;try{return l.toLocaleDateString(m,{timeZone:"UTC",dateStyle:"medium"})}catch{return s}}function c(s){if(!s)return"â";try{return new Date(s).toLocaleString("en-AU",{timeZone:"Australia/Brisbane",dateStyle:"medium",timeStyle:"short"})}catch{return"â"}}function n(s){return x(s)}function d(s,l){return[s,l].filter(Boolean).join(" ")||"â"}function a({label:s,children:l}){return e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:s}),e.jsx("dd",{className:"mt-1 text-sm text-gray-900 wrap-break-word",children:l||"â"})]})}function p({inquiry:s}){return e.jsxs("div",{className:"bg-gray-50 border-t border-gray-200 p-6 space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Sponsor (Australian)"}),e.jsxs("dl",{className:"space-y-3",children:[e.jsx(a,{label:"Name",children:d(s.sponsorFirstName,s.sponsorLastName)}),e.jsx(a,{label:"Email",children:s.sponsorEmail?e.jsx("a",{href:`mailto:${s.sponsorEmail}`,className:"text-blue-600 hover:underline",children:s.sponsorEmail}):null}),e.jsx(a,{label:"Status in Australia",children:s.sponsorStatus}),e.jsx(a,{label:"Resident in Australia now",children:s.sponsorInAustralia}),e.jsx(a,{label:"Marital status",children:s.sponsorMaritalStatus})]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Applicant (visa applicant)"}),e.jsxs("dl",{className:"space-y-3",children:[e.jsx(a,{label:"Name",children:d(s.applicantFirstName,s.applicantLastName)}),e.jsx(a,{label:"Email",children:s.applicantEmail?e.jsx("a",{href:`mailto:${s.applicantEmail}`,className:"text-blue-600 hover:underline",children:s.applicantEmail}):null}),e.jsx(a,{label:"Country of citizenship",children:s.applicantCitizenship}),e.jsx(a,{label:"Country of residence",children:s.applicantCountry}),e.jsx(a,{label:"Marital status",children:s.applicantMaritalStatus})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Relationship"}),e.jsxs("dl",{className:"space-y-3",children:[e.jsx(a,{label:"How they first met",children:s.howFirstMet}),e.jsx(a,{label:"When they first met",children:n(s.whenFirstMet)}),s.whenMetInPerson?e.jsx(a,{label:"When they met in person",children:n(s.whenMetInPerson)}):null,e.jsx(a,{label:"Weeks spent together",children:s.weeksTogether}),e.jsxs(a,{label:"Relationship status now",children:[s.relationshipStatus,s.relationshipStatusOther?` â ${s.relationshipStatusOther}`:""]})]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Children"}),e.jsxs("dl",{className:"space-y-3",children:[e.jsx(a,{label:"Children included",children:s.childrenIncluded}),s.childrenIncluded==="Yes"?e.jsxs(e.Fragment,{children:[e.jsx(a,{label:"Number of children",children:s.childrenCount}),e.jsx(a,{label:"Children's ages",children:s.childrenAges})]}):null]})]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Visa details & background"}),e.jsxs("dl",{className:"space-y-3",children:[e.jsxs(a,{label:"Visa they wish to apply for",children:[s.visaType,s.visaTypeIsUnknown?e.jsx("span",{className:"ml-2 text-xs text-amber-700",children:"(unknown visa type)"}):null]}),e.jsx(a,{label:"Relationship background",children:e.jsx("p",{className:"whitespace-pre-wrap",children:s.relationshipBackgroun
1d})}),e.jsx(a,{label:"Their plans",children:e.jsx("p",{className:"whitespace-pre-wrap",children:s.futurePlans})})]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Submission metadata"}),e.jsxs("dl",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(a,{label:"Submission ID",children:e.jsx("code",{className:"text-xs",children:s.id})}),e.jsx(a,{label:"Submitted",children:c(s.createdAt)}),e.jsx(a,{label:"IP address",children:s.ip}),e.jsx(a,{label:"Submitted from",children:s.pageUrl}),e.jsx("div",{className:"md:col-span-2",children:e.jsx(a,{label:"User agent",children:e.jsx("span",{className:"text-xs text-gray-600",children:s.userAgent})})})]})]})]})}function j(){const{inquiries:s}=o.useLoaderData(),[l,i]=h.useState(null);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"DIY Visa Check Inquiries"}),e.jsx("p",{className:"mt-1 text-gray-600",children:"DIY-Visa Application Check submissions from /diy-visa-application-check-help-for-diy-partner-visa-clients."})]}),s.length===0?e.jsx("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-12 text-center",children:e.jsx("p",{className:"text-gray-500",children:"No DIY visa check inquiries yet."})}):e.jsx("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsx("tr",{children:["Submitted","Sponsor","Sponsor email","Applicant","Visa type","Relationship",""].map(t=>e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:t},t))})}),e.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(t=>{const r=l===t.id;return[e.jsxs("tr",{className:r?"bg-gray-50":void 0,children:[e.jsx("td",{className:"px-4 py-3 text-sm text-gray-900 whitespace-nowrap",children:c(t.createdAt)}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:d(t.sponsorFirstName,t.sponsorLastName)}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:t.sponsorEmail||"â"}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:d(t.applicantFirstName,t.applicantLastName)}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:t.visaType||"â"}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:t.relationshipStatus||"â"}),e.jsx("td",{className:"px-4 py-3 text-sm text-right whitespace-nowrap",children:e.jsx("button",{type:"button",onClick:()=>i(r?null:t.id),className:"text-blue-600 hover:underline",children:r?"Hide":"View"})})]},t.id),r?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"p-0",children:e.jsx(p,{inquiry:t})})},`${t.id}-detail`):null]})})]})})})]})}export{j as component};
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.