1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(()=>{var e={};e.id=681,e.ids=[681],e.modules={398:(e,s,t)=>{Promise.resolve().then(t.bind(t,20787))},2117:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(62688).A)("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]])},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11723:e=>{"use strict";e.exports=require("querystring")},12412:e=>{"use strict";e.exports=require("assert")},13861:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(62688).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},14985:e=>{"use strict";e.exports=require("dns")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20787:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>a});var r=t(60687);function a({children:e}){return(0,r.jsx)("main",{className:"w-full h-screen bg-white",children:(0,r.jsx)("div",{className:"w-full h-full px-4 pt-12 pb-4",children:e})})}t(43210)},21820:e=>{"use strict";e.exports=require("os")},27910:e=>{"use strict";e.exports=require("stream")},28354:e=>{"use strict";e.exports=require("util")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31021:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>g});var r=t(60687),a=t(43210),i=t(24934);let n=(0,t(62688).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var l=t(40228),o=t(13861),d=t(97992),c=t(48730),m=t(2117),u=t(78464),x=t(97499),p=t(70333),h=t(16189);function g(){let[e,s]=(0,a.useState)(null),[t,g]=(0,a.useState)(!0),{toast:b}=(0,p.dj)(),f=(0,h.useParams)(),y=(0,h.useRouter)();f.missionId;let v=e=>new Date(e).toLocaleDateString("fr-FR",{day:"2-digit",month:"long",year:"numeric"});if(t)return(0,r.jsx)("div",{className:"flex justify-center items-center h-[calc(100vh-64px)] bg-gray-50",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})});if(!e)return(0,r.jsx)("div",{className:"flex justify-center items-center h-[calc(100vh-64px)] bg-gray-50 px-4",children:(0,r.jsxs)("div",{className:"text-center bg-white p-8 rounded-lg shadow-sm border border-gray-200 max-w-md",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Mission non trouv\xe9e"}),(0,r.jsx)("p",{className:"text-gray-600 mb-6",children:"Cette mission n'existe pas ou a \xe9t\xe9 supprim\xe9e."}),(0,r.jsx)(i.$,{onClick:()=>y.push("/mission-tab"),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Retour au tableau des missions"})]})});let j=(e=>{let s=e&&e.length>0?e[0]:null,t=s?s.replace("odd-",""):null;return{number:t,label:t?`ODD ${t}`:"Non cat\xe9goris\xe9",iconPath:t?`/F SDG Icons 2019 WEB/F-WEB-Goal-${t.padStart(2,"0")}.png`:""}})(e.oddScope);return(0,r.jsxs)("div",{className:"bg-gray-50 min-h-[calc(100vh-64px)] p-6 overflow-auto",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsxs)(i.$,{variant:"ghost",className:"flex items-center text-gray-600 hover:text-gray-900",onClick:()=>y.push("/mission-tab"),children:[(0,r.jsx)(n,{className:"mr-2 h-4 w-4"}),"Retour au tableau des missions"]})}),(0,r.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-100 mb-6 p-6",children:(0,r.jsxs)("div",{className:"flex justify-between items-start",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:e.name}),(0,r.jsxs)("div",{className:"flex items-center text-gray-500 text-sm gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(l.A,{className:"h-4 w-4 mr-1"}),v(e.createdAt)]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.A,{className:"h-4 w-4 mr-1"}),Math.floor(100*Math.random())+1," Views"]})]})]}),(0,r.jsx)("div",{className:"w-24 h-24 rounded-md overflow-hidden flex-shrink-0",children:e.logoUrl?(0,r.jsx)("img",{src:e.logoUrl,alt:e.name,className:"w-full h-full object-cover rounded-md",onError:s=>{console.log("Logo failed to load:",e.logoUrl),s.currentTarget.style.display="none";let t=s.currentTarget.parentElement;t&&(t.classList.add("bg-gray-100"),t.classList.add("flex"),t.classList.add("items-center"),t.classList.add("justify-center"),t.innerHTML=`<span className="text-3xl font-medium text-gray-500">${e.name.slice(0,2).toUpperCase()}</span>`)}}):(0,r.jsx)("div",{className:"bg-gray-100 w-full h-full flex items-center justify-center",children:(0,r.jsx)("span",{className:"text-3xl font-medium text-gray-500",children:e.name.slice(0,2).toUpperCase()})})})]})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,r.jsxs)("div",{className:"lg:col-span-2 space-y-6",children:[(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-100 p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"\xc0 propos de la mission"}),(0,r.jsxs)("div",{className:"mb-6 flex flex-wrap gap-2",children:[j.number&&(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-gray-100 px-3 py-2 rounded-lg",children:[(0,r.jsx)("img",{src:j.iconPath,alt:j.label,className:"w-8 h-8",onError:e=>{e.target.style.display="none"}}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700",children:j.label})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-gray-100 px-3 py-2 rounded-lg",children:[(0,r.jsx)(d.A,{className:"w-4 h-4 text-gray-500"}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700",children:(e=>{switch(e){case"remote":return"\xc0 distance";case"onsite":return"Sur site";case"hybrid":return"Hybride";default:return e}})(e.missionType)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-gray-100 px-3 py-2 rounded-lg",children:[(0,r.jsx)(c.A,{className:"w-4 h-4 text-gray-500"}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700",children:(e=>{switch(e){case"short":return"< 1 mois";case"medium":return"1-3 mois";case"long":return"> 3 mois";default:return e}})(e.projection)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-gray-100 px-3 py-2 rounded-lg",children:[(0,r.jsx)(m.A,{className:"w-4 h-4 text-gray-500"}),(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Niveau: ",(e=>{switch(e){case"a":return"Apprentissage";case"b":return"Basique";case"c":return"Complexe";case"s":return"Sp\xe9cial";default:return e}})(e.niveau)]})]})]}),e.intention&&(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h3",{className:"text-md font-medium text-gray-800 mb-2",children:"Description"}),(0,r.jsx)("p",{className:"text-gray-600 whitespace-pre-line",children:e.intention})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-md font-medium text-gray-800 mb-2",children:"Mission cr\xe9\xe9e par"}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2",children:(0,r.jsx)("span",{className:"text-xs font-medium text-blue-700",children:e.creator.email.substring(0,2).toUpperCase()})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-700",children:e.creator.email}),(0,r.jsx)("p",{className:"text-xs text-gray-500",children:v(e.createdAt)})]})]})]})]}),e.attachments&&e.attachments.length>0&&(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-100 p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Fichiers joints"}),(0,r.jsx)("div",{className:"space-y-3",children:e.attachments.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg border border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"p-2 bg-blue-100 rounded-md mr-3",children:(0,r.jsx)(u.A,{className:"h-5 w-5 text-blue-600"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800",children:e.filename}),(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:[(e.fileSize/1024).toFixed(1)," KB • ",e.fileType]})]})]}),(0,r.jsx)("a",{href:e.publicUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:text-blue-800 font-medium",children:"T\xe9l\xe9charger"})]},e.id))})]})]}),(0,r.jsxs)("div",{className:"space-y-6",children:[e.services&&e.services.length>0&&(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-100 p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Services"}),(0,r.jsx)("div",{className:"space-y-2",children:e.services.map((e,s)=>(0,r.jsx)("div",{className:"flex items-center py-2 px-3 bg-blue-50 text-blue-700 rounded-md",children:(0,r.jsx)("span",{className:"text-sm font-medium",children:e})},s))})]}),e.profils&&e.profils.length>0&&(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-100 p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Profils requis"}),(0,r.jsx)("div",{className:"space-y-2",children:e.profils.map((e,s)=>(0,r.jsxs)("div",{className:"flex items-center py-2 px-3 bg-purple-50 text-purple-700 rounded-md",children:[(0,r.jsx)(x.A,{className:"h-4 w-4 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-medium",children:e})]},s))})]})]})]})]})}},33873:e=>{"use strict";e.exports=require("path")},34631:e=>{"use strict";e.exports=require("tls")},39718:(e,s,t)=>{Promise.resolve().then(t.bind(t,90609))},41204:e=>{"use strict";e.exports=require("string_decoder")},44167:(e,s,t)=>{Promise.resolve().then(t.bind(t,79310))},55511:e=>{"use strict";e.exports=require("crypto")},55591:e=>{"use strict";e.exports=require("https")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70333:(e,s,t)=>{"use strict";t.d(s,{dj:()=>u,oR:()=>m});var r=t(43210);let a=0,i=new Map,n=e=>{if(i.has(e))return;let s=setTimeout(()=>{i.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);i.set(e,s)},l=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;return t?n(t):e.toasts.forEach(e=>{n(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},o=[],d={toasts:[]};function c(e){d=l(d,e),o.forEach(e=>{e(d)})}function m({...e}){let s=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),t=()=>c({type:"DISMISS_TOAST",toastId:s});return c({type:"ADD_TOAST",toast:{...e,id:s,open:!0,onOpenChange:e=>{e||t()}}}),{id:s,dismiss:t,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function u(){let[e,s]=r.useState(d);return r.useEffect(()=>(o.push(s),()=>{let e=o.indexOf(s);e>-1&&o.splice(e,1)}),[e]),{...e,toast:m,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},74075:e=>{"use strict";e.exports=require("zlib")},78464:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(62688).A)("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]])},79310:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>r});let r=(0,t(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/alma/Documents/NeahNew/app/mission-tab/[missionId]/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/alma/Documents/NeahNew/app/mission-tab/[missionId]/page.tsx","default")},79428:e=>{"use strict";e.exports=require("buffer")},79551:e=>{"use strict";e.exports=require("url")},81630:e=>{"use strict";e.exports=require("http")},83487:(e,s,t)=>{Promise.resolve().then(t.bind(t,31021))},83997:e=>{"use strict";e.exports=require("tty")},84889:(e,s,t)=>{"use strict";t.r(s),t.d(s,{GlobalError:()=>n.a,__next_app__:()=>m,pages:()=>c,routeModule:()=>u,tree:()=>d});var r=t(65239),a=t(48088),i=t(88170),n=t.n(i),l=t(30893),o={};for(let e in l)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(o[e]=()=>l[e]);t.d(s,o);let d={children:["",{children:["mission-tab",{children:["[missionId]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(t.bind(t,79310)),"/Users/alma/Documents/NeahNew/app/mission-tab/[missionId]/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(t.bind(t,90609)),"/Users/alma/Documents/NeahNew/app/mission-tab/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(t.bind(t,58014)),"/Users/alma/Documents/NeahNew/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(t.t.bind(t,57398,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(t.t.bind(t,89999,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(t.t.bind(t,65284,23)),"next/dist/client/components/unauthorized-error"]}]}.children,c=["/Users/alma/Documents/NeahNew/app/mission-tab/[missionId]/page.tsx"],m={require:t,loadChunk:()=>Promise.resolve()},u=new r.AppPageRouteModule({definition:{kind:a.RouteKind.APP_PAGE,page:"/mission-tab/[missionId]/page",pathname:"/mission-tab/[missionId]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},90609:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>r});let r=(0,t(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/alma/Documents/NeahNew/app/mission-tab/layout.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/alma/Documents/NeahNew/app/mission-tab/layout.tsx","default")},91645:e=>{"use strict";e.exports=require("net")},94735:e=>{"use strict";e.exports=require("events")},97499:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(62688).A)("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]])},97992:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(62688).A)("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])}};var s=require("../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[4243,5419,8794,1642,6724,748,6781,5500],()=>t(84889));module.exports=r})(); |