PageSourceSearch

https://yachtcrewcenter.com/assets/Document-BdfXX2HP.js

js yachtcrewcenter.com collected 2026-10-07 02:10:51 UTC 4,016 bytes, 3 lines download raw bytes

1import{R as r,u as x,j as e,aq as p,t as c}from"./index-GIzFOf59.js";import{u as h,a as f}from"./useDocument-yQIhbc3q.js";import{E as g}from"./eye-PvPq9pxj.js";import{U as j}from"./upload-Dmg41QJz.js";const b=[{title:"Identification",description:"Passport, Visas, seafarer Ids"},{title:"Employment",description:"Contracts, references, CV"},{title:"Certificates $ Licenses",description:"STSW, COC, training certificates"},{title:"Medical",description:"STSW, COC, training certificates"},{title:"Yacht",description:"Ship registry, safety certificates"},{title:"Insurance",description:"Health, travel, personal insurance."}],C=()=>{const i=h(),o=f(),n=r.useRef({}),d=x(),m=(s,t)=>{t&&o.mutate({category:s,document:t},{onSuccess:()=>{c.success("Document uploaded successfully"),i.refetch()},onError:()=>{c.error("Failed to upload document")}})},l=r.useMemo(()=>{const s=i?.data?.data.data;return s?s.reduce((t,a)=>(t[a.category]=a.count,t),{}):{}},[i?.data]),u=Object.values(l).reduce((s,t)=>s+t,0);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"mb-8 p-6 rounded-2xl text-white overflow-hidden relative bg-gradient-to-br from-blue-900 to-blue-600",children:[e.jsx("div",{className:"absolute top-0 right-0 w-48 h-48 rounded-full bg-white opacity-10 -mr-20 -mt-20"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-36 h-36 rounded-full bg-white opacity-5 -ml-20 -mb-20"}),e.jsx("div",{className:"relative z-10",children:e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold mb-1",children:"Crew Documents"}),e.jsx("p",{className:"text-blue-100",children:"Manage all your professional certifications and documents"})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-[#3c84ce] bg-opacity-15 px-3 py-2 rounded-full",children:[e.jsx(p,{className:"w-5 h-5 text-white"}),e.jsxs("span",{className:"font-medium text-white",children:[u," Documents"]})]})]})})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-5 lg:gap-6",children:b.map(s=>{const t=l[s.title]||0;return e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 sm:p-5 lg:p-6 hover:shadow-lg transition-all duration-200",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h4",{className:"text-lg sm:text-xl font-semibold text-gray-900 mb-2",children:s.title}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:s.description})]}),e.jsx("div",{className:"mb-4 sm:mb-5",children:e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-3xl sm:text-4xl font-bold text-gray-900",children:t}),e.jsxs("span",{className:"text-sm text-gray-600",children:["Document",t!==1&&"s"]})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs("button",{className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 text-sm 
2                  font-medium text-gray-700 bg-white border border-gray-300 rounded-md 
3                  hover:bg-gray-50 hover:text-gray-900 transition-colors cursor-pointer`,onClick:()=>d("/crew/documents/list",{state:{category:s.title}}),children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden xs:inline",children:"View Documents"}),e.jsx("span",{className:"xs:hidden",children:"View"})]}),e.jsx("input",{type:"file",className:"hidden",ref:a=>{n.current[s.title]=a},onChange:a=>m(s.title,a.target.files?.[0]||null),accept:".pdf,.doc,.docx,.jpg,.jpeg,.png"}),e.jsxs("button",{className:"flex-1 flex items-center justify-center gap-2 px-4 py-2.5 text-sm \n                  font-medium text-white bg-primary rounded-md hover:bg-primary/80` transition-colors cursor-pointer",onClick:()=>n.current[s.title]?.click(),children:[e.jsx(j,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden xs:inline",children:"Upload Document"}),e.jsx("span",{className:"xs:hidden",children:"Upload"})]})]})]},s.title)})})]})};export{C 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.